miwaiwai

导航

自动登录ssh

[care@DataNode2 ~]$ more client.sh
#!/usr/bin/expect -f
set timeout 30
spawn ssh root@127.0.0.1
expect "password:"
send "NSnb6@Pj!#\r"
expect "]*"
interact

[care@DataNode2 ~]$

posted on 2023-12-27 21:22  米歪歪  阅读(5)  评论(0编辑  收藏  举报