hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Running commands over SSH
Reply

Forum Jump

Running commands over SSH

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-27-2002, 05:46 PM
mind21_98 mind21_98 is offline
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?

__________________
-Mooneer
Thoughtbug Software: Hosting shouldn't require any thought.
Legitimate host? Support the Code of Ethical Conduct



Sponsored Links
  #2  
Old 08-28-2002, 12:25 PM
benoire benoire is offline
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 )

  #3  
Old 08-28-2002, 03:02 PM
mind21_98 mind21_98 is offline
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.

__________________
-Mooneer
Thoughtbug Software: Hosting shouldn't require any thought.
Legitimate host? Support the Code of Ethical Conduct

Sponsored Links
  #4  
Old 08-28-2002, 05:23 PM
benoire benoire is offline
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.

  #5  
Old 08-28-2002, 05:23 PM
Ahmad Ahmad is offline
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.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

  #6  
Old 08-28-2002, 05:29 PM
mind21_98 mind21_98 is offline
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.

__________________
-Mooneer
Thoughtbug Software: Hosting shouldn't require any thought.
Legitimate host? Support the Code of Ethical Conduct

  #7  
Old 08-28-2002, 05:36 PM
benoire benoire is offline
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?

  #8  
Old 08-28-2002, 05:38 PM
mind21_98 mind21_98 is offline
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.

__________________
-Mooneer
Thoughtbug Software: Hosting shouldn't require any thought.
Legitimate host? Support the Code of Ethical Conduct

  #9  
Old 08-28-2002, 10:36 PM
Ahmad Ahmad is offline
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.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply

Related posts from TheWhir.com
Title Type Date Posted
Web Hosting Sales and Promos Roundup - February 14, 2014 Web Hosting News 2014-02-14 16:26:38
VIDEO: GlowTouch VP of Operations Russ Broomell Talks Parallels Automation on AWS Whir Tv 2013-10-05 03:51:36
.co.za Domain Price Hike Expected to Push Registrars, ISPs to Use EPP System Web Hosting News 2013-01-11 13:35:51
Netcraft Continues to See a Drop in Responses for July 2012 Web Survey Web Hosting News 2012-07-03 14:35:26
Web Host Connectria Launches IBM AIX Cloud Hosting Web Hosting News 2012-05-03 13:56:33


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?