Python paramiko使用方法代码汇总

上传:残雪花刺 浏览: 15 推荐: 0 文件:PDF 大小:48.79KB 上传时间:2021-02-23 23:37:48 版权申诉
1、用户名、密码登陆方式 import paramiko paramiko.util.log_to_file('paramiko.log') # 记录日志文件 ssh = paramiko.SSHClient() try: ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect('139.xx.xx.xx', username='work', password='***') cmd = 'ls' # 需要执行的Linux命名 stdin, stdout, stderr = ss
上传资源
用户评论