Re: Initiate SSH session from other side?



"dspfun" <dspfun@xxxxxxxxxxx> writes:
Is it possible to somehow trigger an SSH session from inside a network,
so that I can use an SSH session from outside the network into the
network? For example by having a program (crontab) or something
initiating the SSH session from inside the network to a specific
IP-address and port number? The problem is that it is not possible to
directly ssh into the network from outside the network.

I believe you could setup an ssh session from inside to outside
machine. As part of that session, try including port forwarding, of
say port 6666 of the outside box to the inside box port 22. See the
man page for ssh and look at the -R option.

insidebox$ ssh -R6666:127.0.0.1:22 outsideusername@xxxxxxxxxxxxxxxxxx

This will forward all traffic hitting outsidebox port 6666 to port 22
of the insidebox.

Then, if you have an ssh server setup on the inside box,

outsidebox$ ssh -p 6666 insideboxusername@xxxxxxxxx

I think would get you where you want to go.

Best Regards,
--
Todd H.
http://www.toddh.net/
.



Relevant Pages

  • ssh, firewall, port forwarding
    ... I have a bit of trouble with ssh, hopefully you will have some tips ... Behind that device I have a private network of 10.0.0.x. ... the internet connection on both PCs works fine. ... We configured port forwarding on the DSL modem, ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Initiate SSH session from other side?
    ... so that I can use an SSH session from outside the network into the ... IP-address and port number? ...
    (comp.security.ssh)
  • Port forwarding to a linux box with a D-Link 302G problem
    ... ssh and Apache running on a linux server on my local ... a windows box on the local network. ... I have tried to setup port forwarding for ...
    (comp.os.linux.networking)
  • Re: [fw-wiz] Is NAT in OpenBSD PF UPnP enabled or Non UPnP?
    ... >> I start by not giving logins and SSH access to users I don't trust. ... a network topology which goes around the ... >> firewall and thus is a serious hole to network security. ... >> have access via UPnP to, well, anything that device might happen to ...
    (Firewall-Wizards)
  • server services problems
    ... I can ssh within the linux machine to itself. ... Networking is all set up properly, as I can see the rest of the network ... But when I port scan I don't see anything open. ... xinetd service but still nothing shows up on a port scan. ...
    (comp.os.linux.networking)