paramiko.SSHException: Error reading SSH protocol banner

后端 未结 1 1298
野的像风
野的像风 2021-01-04 12:29

I am using Paramiko and trying to connect to my SFTP server. Here is the code I wrote:

class SFTPUploader:
    def __init__(self, host, username, password, p         


        
相关标签:
1条回答
  • 2021-01-04 12:59

    That error is generated when paramiko doesn't receive a protocol banner, or the server sends something invalid. If the server is otherwise working correctly, this may be due to some network restrictions.

    You can use -vvv as an option to the openssh client to get more information about how it's connecting, and you can get the actual banner easily using netcat or telnet on port 22. The banner should start with 'SSH-', or paramiko will return the above error immediately.

    0 讨论(0)
提交回复
热议问题