Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ssh_copy_id() {
- host=$1
- pass=$2
- expect <<-EOF
- spawn ssh-copy-id root@${host}
- expect {
- "*yes/no*" { send "yes\r"; exp_continue }
- "*password*" { send "${pass}\r"; }
- }
- expect eof
- EOF
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement