update
This commit is contained in:
9
ansible/rsa_key/key.sh
Executable file
9
ansible/rsa_key/key.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/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
|
||||
|
||||
13
ansible/rsa_key/test.sh
Executable file
13
ansible/rsa_key/test.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$BASH_VERSION" ]; then exec bash "$0" "$@"; exit; fi
|
||||
|
||||
if [ $1 == '' ]; then exit
|
||||
else; passwd=$1
|
||||
|
||||
while read ip
|
||||
do
|
||||
echo ${ip}
|
||||
#./key.sh ${passwd} ${ip}
|
||||
|
||||
done < ip_list
|
||||
|
||||
Reference in New Issue
Block a user