Can I call Channel.invoke_shell() without calling Channel.get_pty() beforehand, when NOT using Channel.exec_command()

前端 未结 1 1078
野的像风
野的像风 2021-01-16 04:06

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

相关标签:
1条回答
  • 2021-01-16 04:43

    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:
    
    ...
    
    0 讨论(0)
提交回复
热议问题