On 29/08/2007, Michael Watterson <watty at eircom.net> wrote:
> You could ssh and do a script (run by cron) that proxies the modem http
> access to the ssh port after disabling the ssh service. A second
> script set by cron to run some time later then removes the proxy
> and restarts ssh daemon.
>>> You can't have two services on the same port.
You can't, but you can tunnel traffic through SSH and use TCP port
forwarding. Both OpenSSH command line clients and PuTTY support port
forwarding. You need to make sure it's enabled in your sshd_config
(typically in /etc/ssh/sshd_config). The directive is
See the -L and -R flags in the ssh(1) manpage.
ssh -L 6789:w.x.y.z:80 user at homemachine.com
Where w.x.y.z is the IP address of your modem (as you'd reach it from
your home machine) and also presuming you use http on a standard port
to reach your modem (i.e. port 80 above). Then you simply browse to
http://localhost:6789/ on your laptop to magically see your home
Depending on the router and interface, you can probably reach and
configure the thing using w3m or elinks just as easily on the command
line of your home machine.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!