這是我的python腳本連接到服務器。但是當我運行該腳本時,它要求我輸入我的ssh密碼。我怎麼能避免問我的SSH口令密鑰?Paramiko連接時不詢問SSH密鑰
host = '192.168.43.3'
user = 'root'
passwd = 'ppawd'
ssh = paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(host, username=user, password=passwd)
transport = ssh.get_transport()
channel = transport.open_session()
channel.setblocking(1)
channel.settimeout(30)
command = "ls -a"
ssh.exec_command(command)