if you want to run the "ls" command on a remote host:
expect -c 'spawn ssh myuser@acmehost ls ; expect assword ; send "mypassword\n" ; interact'
it works like a breeze!
only problem is that you are exposing your password in clear text...
Saturday, July 7, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment