SSH port forwarding/tunneling

From: Captain Dondo (yan_at_NsOeSiPnAeMr.com)
Date: 10/31/05


Date: Mon, 31 Oct 2005 07:18:18 -0800

I've got a question about port forwarding....

I have a machine that will be located remotely. I have ssh installed
on this machine. I cannot install any sort of VPN on this machine.

The machine will be behind a firewall, so I need a way to access this
machine.

What I'd like to do is set up a persistent ssh connection to my server,
and then portforward back through this connection so I can connect to the
ssh server on the machine.....

One more time:

machine A is at my desk.

machine B is far, far away.

Machine B connects to machine A via ssh, forwarding some port that
connects back to itself....

I use ssh localhost -p someport on machine A to log into machine B.

I've been playing around with all sorts of ways to try to portforward
using -L and -R, but I always get something that doesn't work or a message
that the port cannot be forwarded.....

I've found all sorts of docs on how to forwards ports if I want to tunnel
in the same direction as the ssh connection, but nothing that tells me how
to tunnel 'backwards'....

TIA,

--Yan



Relevant Pages

  • Re: SSH trickery using -R
    ... > ssh connection to a remote machine, using the -R switch, which opens a ... > port on the remote machine, which is then redirected to the local ... on a port of my choosing. ... I also usually put the ssh comman inside a shell script with ...
    (Fedora)
  • Re: ssh gives "Permission denied, please try again"
    ... port 22 on your internal machine, so you will need to keep ssh up to ... I configure the router to forward a different external port to 22 on my ... For good measure pick usernames that are none obvious, ... root/password: 163 times ...
    (uk.comp.os.linux)
  • [NEWS] SSH service at Dell DRAC4 Denial of Service (Mocana)
    ... SSH service at Dell DRAC4 Denial of Service ... Dell Remote Access Card 4 allows customers to effectively manage ... After the use of such a port scanner, ...
    (Securiteam)
  • Re: Remote Desktop directly to another computer on the network
    ... default port... ... And there is no reason for me to believe that ssh ... When I have a multibillion company I will use the key pair, ... WinSCP for that to access my home SSH server. ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: SSH safety
    ... SSH safety (J.L. ... FC3 missing KDE menu items ... I was wondering how safe it is to open the ssh port up to the internet. ...
    (Fedora)