OpenSource Fanatic
Friday, October 26, 2012
SSH Passwordless Authentication by expect system call
#!/bin/bash
HOSTS="192.168.0.1"
PASSWORD=Passw0rd@1
for HOST in $HOSTS
do
expect -c "
spawn /usr/bin/scp -rvpv -c blowfish /oracle/test/ oragsd@$HOST:/oracle/
expect {
"*password:*" { send $PASSWORD\r;interact }
}
exit
"
done
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment