don't exit sftpserver if fail to read SSH protocol banner #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
often get the following errors and the sftpserver exit, we don't want the sftpserver exit if SSH protocol banner not received for one connection.
DEBUG:paramiko.transport:starting thread (server mode): 0x38102dd0L
DEBUG:paramiko.transport:Local version/idstring: SSH-2.0-paramiko_2.4.1
ERROR:paramiko.transport:Exception: Error reading SSH protocol banner
ERROR:paramiko.transport:Traceback (most recent call last):
ERROR:paramiko.transport: File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 1893, in run
ERROR:paramiko.transport: self._check_banner()
ERROR:paramiko.transport: File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 2049, in _check_banner
ERROR:paramiko.transport: 'Error reading SSH protocol banner' + str(e)
ERROR:paramiko.transport:SSHException: Error reading SSH protocol banner
ERROR:paramiko.transport:
Traceback (most recent call last):
File "/usr/bin/sftpserver", line 11, in
sys.exit(main())
File "/usr/lib/python2.7/site-packages/sftpserver/init.py", line 96, in main
start_server(args.host, args.port, args.keyfile, args.level)
File "/usr/lib/python2.7/site-packages/sftpserver/init.py", line 60, in start_server
transport.start_server(server=server)
File "/usr/lib/python2.7/site-packages/paramiko/transport.py", line 614, in start_server
raise e
paramiko.ssh_exception.SSHException: Error reading SSH protocol banner