我正在寫python腳本來使用paramiko登錄到ssh服務器。 我在下面寫了腳本。在Python腳本中獲取錯誤「AttributeError:'模塊'對象沒有屬性'auth_none'」
#!/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的:「模塊」對象有沒有屬性「AUTH_NONE」
任何人都知道爲什麼我收到此錯誤
謝謝!