I have read Paramiko docs multiple times. Still I am not able to find an answer for question I had:
Why can\'t I call channel.invoke_shell()
without cal
You can call Channel.invoke_shell()
without calling Channel.get_pty()
.
If it does not work it is a limitation of your server, not of JSch.
And you already know from your previous question that it is so.
With my Win32-OpenSSH 7.7 on Windows 10 Pro 1903, I can use shell session without TTY without any problem:
C:\>echo ipconfig | plink -T username@localhost -pw password
Using username "username".
Microsoft Windows [Version 10.0.18362.356]
(c) 2019 Microsoft Corporation. All rights reserved.
username@COMPUTERNAME C:\Users\username>ipconfig
Windows IP Configuration
Ethernet adapter Ethernet 2:
...