Hello Genius,
when I used the demo_sftp.py to try the sftp connection ,some of my servers throw the following exception:
[root@sallic001 demos]# python demo_sftp.py 10.220.115.106
/usr/lib64/python2.4/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
Username [root]: a13li
Password for a13li@10.220.115.106:
Using host key of type ssh-rsa
*** Caught exception: paramiko.SSHException: Channel closed.
Traceback (most recent call last):
File "demo_sftp.py", line 85, in ?
sftp = paramiko.SFTPClient.from_transport(t)
File "/usr/lib/python2.4/site-packages/paramiko/sftp_client.py", line 105, in from_transport
chan.invoke_subsystem('sftp')
File "/usr/lib/python2.4/site-packages/paramiko/channel.py", line 240, in invoke_subsystem
self._wait_for_event()
File "/usr/lib/python2.4/site-packages/paramiko/channel.py", line 1084, in _wait_for_event
raise e
SSHException: Channel closed.
#######################
but at the same time when I tried other servers(with same system version and etc.) ,they works ok ,
I don't what's wrong with it , you can look at the following sftp log for more debug informations ,
tail: demo_sftp.log: file truncated ---------------------------------------------------------------------------------------- error connection with another server as below
DEB [20121107-03:46:29.106] thr=1 paramiko.transport: starting thread (client mode): 0x26B574D0L
INF [20121107-03:46:29.273] thr=1 paramiko.transport: Connected (version 2.0, client OpenSSH_4.6p1-hpn12v17)
DEB [20121107-03:46:29.423] thr=1 paramiko.transport: kex algos:['diffie-hellman-group-exchange-sha256', 'diffie-hellman-group-exchange-sha1', 'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['blowfish-cbc', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] server encrypt:['blowfish-cbc', 'aes128-cbc', '3des-cbc', 'aes192-cbc', 'aes256-cbc'] client mac:['hmac-md5', 'hmac-sha1', 'hmac-ripemd160', '<email address hidden>', 'hmac-sha1-96', 'hmac-md5-96'] server mac:['hmac-md5', 'hmac-sha1', 'hmac-ripemd160', '<email address hidden>', 'hmac-sha1-96', 'hmac-md5-96'] client compress:['none', '<email address hidden>'] server compress:['none', '<email address hidden>'] client lang:[''] server lang:[''] kex follows?False
DEB [20121107-03:46:29.423] thr=1 paramiko.transport: Ciphers agreed: local=aes128-cbc, remote=aes128-cbc
DEB [20121107-03:46:29.424] thr=1 paramiko.transport: using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
DEB [20121107-03:46:29.644] thr=1 paramiko.transport: Switch to new keys ...
DEB [20121107-03:46:29.645] thr=2 paramiko.transport: Host key verified (ssh-rsa)
DEB [20121107-03:46:29.645] thr=2 paramiko.transport: Attempting password auth...
DEB [20121107-03:46:30.063] thr=1 paramiko.transport: userauth is OK
INF [20121107-03:46:30.229] thr=1 paramiko.transport: Authentication (password) successful!
DEB [20121107-03:46:30.239] thr=2 paramiko.transport: [chan 1] Max packet in: 34816 bytes
DEB [20121107-03:46:30.390] thr=1 paramiko.transport: [chan 1] Max packet out: 32768 bytes
INF [20121107-03:46:30.390] thr=1 paramiko.transport: Secsh channel 1 opened.
DEB [20121107-03:46:30.560] thr=1 paramiko.transport: [chan 1] EOF sent (1)
DEB [20121107-03:46:30.659] thr=1 paramiko.transport: EOF in transport thread