LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-31-2005, 06:25 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Command to connect ssh form win to lin??


Hi Iam creating a php interface to access and administrate linux from a windows box....

The question is that I need to connect to the linux box with ssh to administrate it right ??? ... and for that purpose I use PuTTy, now if I need to create an ssh connection through a php interface what command should I use >???
 
Old 10-31-2005, 07:58 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
The only way I can think of is using something like shell_exec(" "); whereby you would grab the username + password provided in a basic web form, store them as variables, then execute the command and return the results to screen. A simple text box allows you enter your commands, then shell_exec returns the output. I don't know if it's a very efficient way of doing it though and I think you only have the last line returned to screen, so am not sure how it would handle directory listings or displaying a list of running processes, etc.
 
Old 10-31-2005, 08:01 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
But shouldn't I create a ssh connection btw the win client and the linux server ??? The way you are stating it I can just execute any command on the linux box as long as I got a username and pwd with enough priveliges did i get that right ?? I mean how should I provide the address of the remote host???

Last edited by ALInux; 10-31-2005 at 08:06 AM.
 
Old 10-31-2005, 09:38 AM   #4
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Maybe you could check Plink. It should be the command-line interface of PuTTY. (never tryed it myself)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
inet ok, yast update not ok, win to lin ok, lin to win not ok captain skywave Linux - Networking 4 08-22-2005 03:17 AM
shell script works form command line but not form crontab saifee General 1 10-14-2004 11:27 AM
Errors When I copied Win files from Lin back to Win! dougp25 Linux - General 2 09-15-2004 06:03 AM
how do I copy a whoel folder form one directory to another form the command line? zwyrbla Linux - Newbie 8 08-24-2004 07:40 PM
Win 4 Lin ??? landshark753 Linux - General 1 02-01-2002 01:55 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration