我使用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')