Posted by Tracy Savage on 12/19/05 20:38
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 192.168.1.100:5055:10.1.1:100 tracy@myserver.myfakedns.org
Running this makes 192.168.1.100 listen on port 5055 and forward that
traffic through to my server on the inside on the firewall at
myserver.myfakedns.org. 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 '192.168.1.100:5055:10.1.1100:23'
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
option]
[-p port] [-R port:host:hostport] [-S ctl] [user@]hostname
[command]
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?
Navigation:
[Reply to this message]
|