LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Supplying "password" to "ssh" command (http://www.linuxquestions.org/questions/linux-networking-3/supplying-password-to-ssh-command-659433/)

paragkalra 07-31-2008 03: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@192.168.1.10 date

datopdog 07-31-2008 06: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 10:59 PM.