cgi shell script: ssh not working
I'm writing my very first cgi shell script. The main purpose of this script is to execute remotely several scripts on several machines outside the server.
I was hoping to use ssh to launch these remote scripts when a user presses a button on my website. The cgi script looks something like.... #!/bin/sh # Here's my first cgi script echo "Content text/plain" echo "" ....HTML language.... ssh user@remotebox1 "path/command" ssh user@remotebox2 "path/command" ...HTML lang..... However, nothing's happening. No error, nothing. Could someone with more experience please help me. Thanks Kit |
well first off...i would not use a bash program for a cgi script.you would be better off using perl.
second..it will not be as easy as u pressing a button and ssh "magically" working. you will first have to setup key based authentication or ask the user for the password for the account and pass the command that password(i have no idea how to do this second step...i'm not sure if it can be done at all). besides...dont u think it will be insecure to have a button on a page and then let people execute commands over ssh? |
Quote:
|
All times are GMT -5. The time now is 12:11 PM. |