diff options
Diffstat (limited to 'data')
-rwxr-xr-x | data/ssh_exch.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/data/ssh_exch.exp b/data/ssh_exch.exp new file mode 100755 index 00000000..1b462c42 --- /dev/null +++ b/data/ssh_exch.exp @@ -0,0 +1,12 @@ +#1 /usr/bin/expect +set timeout 4 +set ip [lindex $argv 0] +set pswd [lindex $argv 1] +spawn ssh-copy-id -i /root/.ssh/id_rsa $ip +expect "Are you sure you want to continue connecting" {send "yes\r"} +expect "password" { send "$pswd\r"} + +interact + + + |