ssh and php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have an internal server that I want to create some tunnels on so I can  
telnet into remote PCs on my other networks. From the command line or  
from a script executed as root (and vi php -q )it works as expected.  
Here is the command I am using:

ssh -L

Running this makes listen on port 5055 and forward that  
traffic through to my server on the inside on the firewall at I gave apache permission to run this script in  
sudo but it still does not work. I get no real clues except this error  
in the apache error log:

Bad forwarding specification ''
usage: ssh [-1246AaCfghkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
            [-D port] [-e escape_char] [-F configfile] [-i identity_file]
            [-L port:host:hostport] [-l login_name] [-m mac_spec] [-o  
            [-p port] [-R port:host:hostport] [-S ctl] [user@]hostname  

The script is being run (I have tried exec, system and shell_exec), but  
it fails because there is something probably wrong with permissions  
somewhere. I don't know what else to do because I have already given  
apache permission in sudo. I even tried giving apache all permissions in  
sudo and that didn't work either. How can I make apache set up this tunnel?

barring this, is there an ssh class for PHP that will let me create  
these fairly complex tunnels?

Re: ssh and php

Tracy Savage wrote:
Quoted text here. Click to load it


Re: ssh and php

Tracy Savage wrote:

Quoted text here. Click to load it
Dotted-decimal IP addresses have *four* numeric components, not three.

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Re: ssh and php


on 12/19/2005 04:38 PM Tracy Savage said the following:
Quoted text here. Click to load it

I don't know if you can create tunnels with this, but there is this pure  
PHP class that can be used to connect via ssh that does not use ssh  


Manuel Lemos

Metastorage - Data object relational mapping layer generator

PHP Classes - Free ready to use OOP components written in PHP

Site Timeline