How to add password paramtre to ssh command?
I dont want to use ssh key authentication.
I have a simple script which I need to ssh to remote machine and all I want is to supply the password on the same ssh commandline? Is it possible? |
Quote:
|
Code:
you can use expect to send the password |
Hello,
I use sshpass on my Debian servers to send the complete connection and command string from within my scripts. Should be in your repositories, if not have a look at Google. I use it like this: Code:
sshpass -p 'password' ssh user@server 'command' Eric |
Quote:
EricTRA...nice one. Never even heard of that particular goodie. I'd always swap keys, or use Perl or expect to knock out something. Probably perl, since (I think), it's a bit more robust. |
All times are GMT -5. The time now is 08:07 AM. |