
08-27-2002, 05:46 PM
|
|
Web Hosting Master
|
|
Join Date: Dec 2000
Location: San Diego, CA
Posts: 1,571
|
|
Running commands over SSH
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-28-2002, 12:25 PM
|
|
Registered User
|
|
Join Date: Jul 2001
Location: Coventry, England
Posts: 130
|
|
Not every hosting account has SSH access, and this would also limit your script to Linux servers... how about giving your clients a script to upload to their site which doesn't need any permissions set etc, and which can then talk to your website and pass it the information that way if you follow me (just yell at me if you don't  )
|

08-28-2002, 03:02 PM
|
|
Web Hosting Master
|
|
Join Date: Dec 2000
Location: San Diego, CA
Posts: 1,571
|
|
Quote:
Originally posted by benoire
Not every hosting account has SSH access, and this would also limit your script to Linux servers... how about giving your clients a script to upload to their site which doesn't need any permissions set etc, and which can then talk to your website and pass it the information that way if you follow me (just yell at me if you don't )
|
It'd kinda ruin the whole purpose of such a script (which takes care of everything for you). However, I could FTP it up there automatically for them. Hmm.
|

08-28-2002, 05:23 PM
|
|
Registered User
|
|
Join Date: Jul 2001
Location: Coventry, England
Posts: 130
|
|
That did cross my mind, which is why I said it should only be a simple thing that requires no configuration etc. Like you say, though, you could FTP it across from your site and do it that way. I don't think accessing via SSH is a good avenue to go down though for the reasons I gave before.
|

08-28-2002, 05:23 PM
|
|
Web Hosting Master
|
|
Join Date: Jan 2002
Location: Kuwait
Posts: 679
|
|
Yeah. I would say FTP. There is no need for SSH. It will work for both, linux and windows servers.
|

08-28-2002, 05:29 PM
|
|
Web Hosting Master
|
|
Join Date: Dec 2000
Location: San Diego, CA
Posts: 1,571
|
|
Quote:
Originally posted by Ahmad
Yeah. I would say FTP. There is no need for SSH. It will work for both, linux and windows servers.
|
The script'll need different code for both platforms too (in terms of path to Perl, etc.). Windows will be a bigger pain than it's worth, so I'll just initially support Linux for now.
|

08-28-2002, 05:36 PM
|
|
Registered User
|
|
Join Date: Jul 2001
Location: Coventry, England
Posts: 130
|
|
Quote:
Originally posted by mind21_98
The script'll need different code for both platforms too (in terms of path to Perl, etc.). Windows will be a bigger pain than it's worth, so I'll just initially support Linux for now.
|
Why would you need different code? Just have a simple script which you FTP across that grabs all the server/env variables and opens a socket to your site to pass them across or something and you should have all the info you need, no?
|

08-28-2002, 05:38 PM
|
|
Web Hosting Master
|
|
Join Date: Dec 2000
Location: San Diego, CA
Posts: 1,571
|
|
Quote:
Originally posted by benoire
Why would you need different code? Just have a simple script which you FTP across that grabs all the server/env variables and opens a socket to your site to pass them across or something and you should have all the info you need, no?
|
Windows boxes don't have 'locate' or 'whereis' for instance, so you can't just run "whereis perl".  They might run Perl a bit differently though.
|

08-28-2002, 10:36 PM
|
|
Web Hosting Master
|
|
Join Date: Jan 2002
Location: Kuwait
Posts: 679
|
|
Well, you can have your script try to determine any information, and then ask the user anything you can't find.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|