paramiko.ssh_exception.ProxyCommandFailure中返回破坏的管道错误

时间:2014-06-11 14:54:50

标签: paramiko

我使用paramiko

获取以下代码的管道错误
 import paramiko
 proxy  = paramiko.ProxyCommand('/usr/bin/nc -vvv  -xhost:1080 %h %p')
 client = paramiko.SSHClient()
 client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
 client.connect('hostname', 22,username='user', password='pwd', sock=proxy)
 stdin, stdout, stderr = client.exec_command('ls')
 print "output", stdout.read()
 error = stderr.read()
 print "err", error, len(error)
 ftp = client.open_sftp() 
 ftp.get('file')
 ftp.close()
 client.close()

我得到的错误是 paramiko.ssh_exception.ProxyCommandFailure :(' / usr / bin / nc -vvv -w30 -xhost:1080%h%p',' Broken pipe')

0 个答案:

没有答案