摘要: import paramiko private_key = paramiko.RSAKey.from_private_key_file('id_rsa.txt') #创建ssh对象 ssh =paramiko.SSHClient() #允许连接不在know_host文件中的主机 ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy) #... 阅读全文
posted @ 2018-06-13 23:46 努力乄小白 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 服务器sshd配置 #vim /etc/ssh/sshd_conf PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys #/etc/init.d/sshd restart windows生成密钥 Xshell 打开Xshell->工具->新建用户密钥生成向导(W) RSA加密方式,2048位密钥长度... 阅读全文
posted @ 2018-06-13 20:51 努力乄小白 阅读(6691) 评论(0) 推荐(0) 编辑