随笔分类 -  脚本

摘要:#清除ssh cd ~/.ssh; rm -rf id_rsa; rm -rf id_rsa.pub; rm -rf authorized_keys; #生成密钥 expect << ooff set timeout 60 spawn ssh-keygen -t rsa expect { "Ente 阅读全文
posted @ 2024-11-22 14:39 基础狗 阅读(7) 评论(0) 推荐(0) 编辑
摘要:set timeout 60 spawn ssh root@master expect { #首次连接 "(yes/no)?" {send "yes\r";exp_continue} "password" {send "root\r"} } expect "~]#" {send "echo 192. 阅读全文
posted @ 2024-11-22 14:38 基础狗 阅读(4) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示