diff options
Diffstat (limited to 'data/ssh_exch.exp')
-rwxr-xr-x | data/ssh_exch.exp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/data/ssh_exch.exp b/data/ssh_exch.exp index 1b462c42..4ced0c6a 100755 --- a/data/ssh_exch.exp +++ b/data/ssh_exch.exp @@ -2,11 +2,8 @@ set timeout 4 set ip [lindex $argv 0] set pswd [lindex $argv 1] -spawn ssh-copy-id -i /root/.ssh/id_rsa $ip +spawn ssh-copy-id -i /root/.ssh/id_rsa.pub $ip expect "Are you sure you want to continue connecting" {send "yes\r"} -expect "password" { send "$pswd\r"} +expect "password:" { send "$pswd\r"} interact - - - |