Files
2023-12-19 13:36:16 +09:00

9 lines
184 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