Monday, December 19, 2011

Auto ssh command

$ ssh -q -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -l remote_login remote_host "command opts args..."
 
 Ref: http://www.unix.com/shell-programming-scripting/75930-how-do-i-handle-ssh-response-expect.html

Auto ssh command


In expect script, below one is working:


spawn ssh  -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $vIP

No comments:

Post a Comment