10 lines
185 B
Bash
Executable File
10 lines
185 B
Bash
Executable File
#!/usr/bin/expect -f
|
|
set password [lindex $argv 0]
|
|
set host [lindex $argv 1]
|
|
|
|
spawn ssh-copy-id -o StrictHostKeyChecking=no root@$host
|
|
expect "password:"
|
|
send "$password\n"
|
|
expect eof
|
|
|