Results 1 to 3 of 3
I am running
ssh user@hostname [command]
from CGI script but as I am not providing the password its not running.
How can I provide password at runtime or is there ...
- 01-11-2008 #1Linux Newbie
- Join Date
- Jan 2008
- Posts
- 114
Want to run ssh user@hostname [command] from CGI Script
I am running
ssh user@hostname [command]
from CGI script but as I am not providing the password its not running.
How can I provide password at runtime or is there any way to hardcode it in CGI script?
- 01-11-2008 #2Linux User
- Join Date
- Jun 2007
- Posts
- 318
You could use public/private keys. Refer to the manpage for ssh-keygen for details.
Then look at the -i option for ssh in ssh's manpage on how to use those keys in the ssh command.Code:# man ssh-keygen
Vic
- 01-11-2008 #3
Indeed. Taking it one step further, you can set up your system as described in:
setting up no-password ssh
I have one of my systems set up this way, and it makes life easier.DISTRO=Arch
Registered Linux User #388732


Reply With Quote