摘要: 借助expect工具实现非交互式的ssh-copy-id cat auto_sshcopyid.exp #!/usr/bin/expect set timeout 10 set user_hostname [lindex $argv 0] set password [lindex $argv 1] 阅读全文
posted @ 2021-03-06 13:52 ST运维 阅读(225) 评论(0) 推荐(0) 编辑
摘要: SSH部分 操作主机创建密钥 [root@localhost ~]# ssh-keygen [root@localhost ~]# ls .ssh/ id_rsa id_rsa.pub 分发公钥到被监控端 [root@localhost .ssh]# ssh-copy-id -i id_rsa.pu 阅读全文
posted @ 2021-03-06 12:41 ST运维 阅读(251) 评论(0) 推荐(0) 编辑