Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How "IN PHP" can I call ssh?

Status
Not open for further replies.

tarn

Technical User
Aug 19, 2001
534
GB
Pease do not mark this as inappropriate with out first offering some explanation for your reasons.

If its not possible just say so and offer some alternatives please.

So I want to generate a page with php that has my list of IP addresses (probably a query from my database), now that’s easy. But I would then like the option of being able to click on the IP and have "PHP" or an alternative method that maybe you know of, launch an ssh connection to that clicked IP.

Thanks,
Laurie #;¬{
 
You can't do it on the server side. A web browser does not allow for interactive sessions.

You can't do it definitively on the client side. Ssh client software is not guaranteed to be installed on the user's machine, so you can't just output a link of some kind.

And if you're doing it through an HTML tag, then this is no longer a PHP question anyway.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thanks for the reply sleipnir214,

Thats a shame, so there is no way that I can have the serverside php check the client for an installed application and if not present, offer that application from the server for download/install?

So maybe Micro$coff "has" got something to offer after all!

Ok so how about if I could set a mime type on the server to kick off the local application and parsing the IP address to it in a php or ENVIRONMENT varable???

Is this realistic?

Laurie.
 
Since PHP runs on the server, there is no way for it to determine what software is running on the client. There may be a way to gather the information with client-side scripting, but at that point this question ceases to be a PHP question.

You can probably kick off an application using HTML code. However, again, there is no guaranty that a client's machine will have ssh installed, so there is no guaranty that your code will work.

Also, not all browsers will let you start arbitrary applications. The ability to do so is a security hole that IE's VBScript makes available.

What you are trying to do is possible. It's just that the attempt to do so is not in the realm of PHP.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thanks again,
I appreciate what you are saying and will probably pursue it to a resolution "later when I get some spare time".

This is basically to resolve my need for a model management site that would allow me an my team to have some way of instantly connecting to any of the models (that regularly change their IP addresses and networks) from a "one point of reference" screen.

The database would be dynamically updated as the "automatic network changes" are run and will be a part of the Auditing program/scripts that I am developing.

Thanks again.
Laurie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top