You are here: ssh and php « PHP Programming Language « IT news, forums, messages
ssh and php

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация