Files
dsk-iac/ansible/rsa_key/key.sh
havelight-ee 4c32a7239d update
2023-05-30 14:44:26 +09:00

10 lines
187 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 ubuntu@$host
expect "password:"
send "$password\n"
expect eof