在python脚本中出现错误“AttributeError: 'module' object has no attribute 'auth_none'”
我正在写一个Python脚本,用来通过paramiko登录到SSH服务器。下面是我写的脚本。
#!/usr/bin/python
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
paramiko.transport.auth_none('sachin')
ssh.connect('localhost', username='sachin', password='abc123')
stdin, stdout, stderr = ssh.exec_command('df -h')
print stdout.readlines()
ssh.close()
现在我遇到了一个错误,错误信息是:AttributeError: 'module' object has no attribute 'auth_none'。
有没有人知道我为什么会出现这个错误?
谢谢!!!