标签:pre highlight and imp pass paramik password param missing
import paramiko import time import web def Print_creen(): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname=‘192.168.50.3‘,port=22,username=‘root‘,password=‘123456‘) stdin,stdout,stderr=ssh.exec_command(‘df -h‘) result= stdout.read() results = result.decode(‘utf8‘) print(results) ssh.close() return results Print_creen()
标签:pre highlight and imp pass paramik password param missing
原文地址:https://www.cnblogs.com/yangxiufeng/p/10659304.html