Results 1 to 3 of 3
Thread: Running commands over SSH
02-27-2003, 12:39 AM #1ramGuest
I was thinking of creating a site that will automatically install commonly used CGI scripts for you (i.e. upload all files where they should go, add the proper path to Perl and all that good stuff). In order to do some of the application scanning, I would need to have my PHP script SSH into the client's account.
I think I could do it via RSA keys, but some hosting clients don't know enough of SSH to set them up. Would there be some way to feed in the password directly to ssh in PHP?
08-17-2003, 07:59 PM #2eicklerrGuest
I don't think there is any easy way of doing it. You can maybe use "expect", but I've never been able to figure out how to use it. It's supposed to wait for a string (ie. "<username>'s password:"), and send a string (ie. your password) back when it recieves what it's waiting for.
ftp (although not as secure as scp), lets you give it an "account" flag to pass it your password.
08-29-2003, 10:10 PM #3ProWebUKGuest
hotscripts.com sarch for autoinstaller, all you need is a script that will be something like:
cp /cgiscript /$specifiedaccount/cgi0bin/cgiscript
aslong as the files were chmodded in the main version shell should copy the files KEEPING the chmod..... your biggest problem with manully making one is >> all files will be owned by root unless you chown them ater you copied them