这是一些不提供任何输出的代码
#!/usr/bin/python
import sys
import paramiko
def remote_ssh(hostname, cmd):
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname, username='blahblah', password='blahblah')
stdin, stdout, stderr = ssh.exec_command(cmd)
out = stdout.readlines()
for lines in out:
print lines
remote_ssh(sys.argv[1],sys.argv[2])