Update
This commit is contained in:
19
key.sh
Normal file
19
key.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set user "root"
|
||||
set password "saasadmin1234"
|
||||
|
||||
for {set i 200} {$i <= 219} {incr i} {
|
||||
set host "10.10.43.$i"
|
||||
spawn sh -c "ssh-copy-id -o StrictHostKeyChecking=no $user@$host"
|
||||
expect {
|
||||
"*password:" {
|
||||
send "$password\r"
|
||||
exp_continue
|
||||
}
|
||||
eof {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user