I switched from pysftp to sftpretty to overcome this recent issue with paramiko v4.0.0,
sftpretty showed to be an easy replacement and works with paramiko v4.0.0,
nevertheless I'm facing repeated errors when an connection ends with an unexpected EOF
paramiko/sftp.py", line 199, in _read_all
raise EOFError()
...
paramiko/sftp_client.py", line 132, in __init__
raise SSHException("EOF during negotiation")
....
sftpretty/__init__.py", line 322, in _sftp_channel
_channel.close()
AttributeError: 'NoneType' object has no attribute 'close'
Sorry, hard for me to reproduce a EOF, this is the 3rd that this happens today