Re: Tunneling to a third host



On Wed, 28 Jun 2006 02:11:05 -0700, SnakeyJakey wrote:

i am on a windows box using ssh.com's ssh client (will call it client).

my linux box (host) at work does not have a open port to the internet but
another linux box (gateway) on our network does. i can ssh into this box
and then from that terminal ssh into mine. i have a vnc server running on
host

what i want to do is forward port from client through gateway to host so i
can vnc directly from client to host.

This sounds very similar to what I am doing. On the client box I do the
following (using your notation):

ssh -fngT -L 3022:host:22 -C gateway ping -i 30 localhost

In this client box I have a .ssh/config file (I am running OpenSSH) with
the following entries:

Host gateway
HostName xx.xx.xx.xx
HostKeyAlias gateway
User UsernameOnGateway
Port 2222

Host host
HostName localhost
HostKeyAlias host
User UsernameOnHost
Port 3022

In my case, gateway (which has an external IP address represented as
xx.xx.xx.xx here) listens for incoming ssh connections from the external
world on port 2222, and for incoming connections from the internal LAN on
port 22.

Thus, if I am logged in to the client box on the account where I have
this setup (and assuming that I have installed my public keys correctly in
the relevant accounts in gateway and host) after issuing the command

ssh host

I automatically get an interactive shell at host.

I am not sure if this addresses what you have in mind, but I hope that it
helps anyway.

.



Relevant Pages

  • Re: Port Forwarding
    ... I'm using SecureCRT 5.2.1 and i want to make ssh tunnel to access some ... I have to access Host 2, but to get to host 2 i have to first access ... Is there a way of doing it on SecureCRT? ... pick a port to use locally. ...
    (comp.security.ssh)
  • Re: A firewall wont stop this one
    ... On top of that I implement IPF on each host ... >> for further access control to limit NFS, ... By restricting access to the NFS server. ... >> via port filtering that only allowed specific hosts rather than all. ...
    (alt.computer.security)
  • Re: Alternatives for port forwarding
    ... to exceed what SSH can accomplish. ... If one user is having host A log in with a remote forward listening on ... port 10000, with the intent of logging in from host B with a local forward ... or any connections to a port on the server. ...
    (comp.security.ssh)
  • Dont write to known_hosts
    ... me a great deal of mess every time I try to SSH login from Linux. ... He has made some kind of port forwarding on a gateway host to protect some ... The machines are all Linux machines and are all ...
    (comp.security.ssh)
  • Alternatives for port forwarding
    ... I've been thinking about some ideas I'd like to do with port forwarding ... to exceed what SSH can accomplish. ... If one user is having host A log in with a remote forward listening on ...
    (comp.security.ssh)