ansible v2 (release 3.4.9)
This commit is contained in:
9
ssh_key/README.md
Normal file
9
ssh_key/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ssh key 배포 installer
|
||||
|
||||
# authorized_keys.yaml은 client에 ssh-pass가 설치되어 있어야 해서 일단 미사용
|
||||
|
||||
1. 사전 작업
|
||||
- ssh-keygen
|
||||
|
||||
2. 명령어
|
||||
- ./key.sh <PASSWORD> <IPADDR>
|
||||
8
ssh_key/key.sh
Executable file
8
ssh_key/key.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/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
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/expect -f
|
||||
spawn ssh-copy-id root@$argv
|
||||
expect "password:"
|
||||
send "password\n"
|
||||
expect eof
|
||||
Reference in New Issue
Block a user