-   Linux - Networking (
-   -   Supplying "password" to "ssh" command (

paragkalra 07-31-2008 02:42 AM

Supplying "password" to "ssh" command
Hey all,

I intend to execute a command on one of my network machine through cronjob. It may so happen that I may not be available at that time to supply the password.

Also I cannot use private/public key concept to enable password less login due to security reasons.

I know it can be done through "expect" utility but is there a way I can provide password directly to ssh command.

For example:
$ssh -<some-argument> <password> user@remote-machine <command-to-be-executed>

Take for instance:
$ssh -password LetmeIN pollengrain@ date

datopdog 07-31-2008 05:19 AM

ssh is interactive, you cannot specify the password to use on the command line use expect as you said.

All times are GMT -5. The time now is 09:18 PM.