ssh - reverse tunnels

bruce badouglas at gmail.com
Mon Jan 20 18:44:44 UTC 2014


hey guys/gals.

Got an issue where I'm getting hang ups for ssh, where I ssh into a
vm, and then using a reverse tunnel to hop to another box..

here's the basic process:

box1 - create (via cron) ssh/reverse ssh for the vm
-sets up the box1 sshd, as well as the reverse ssh tunnel
  going from the vm1->box1

ssh into vm1 from a box - box is outside the ip sub domain of the box1/vm1

on the vm1 box- ssh into the box1

successfully get into box1/ip1

wait a bit.. few mins, etc..

box1/ip1 times out, user can't type in the term window for the box1/ip1.

go in the vm1 - find the ssh/ps ID for the reverse tunnel/ssh
 netstat -Nplv | grep "ssh"
kill it, wait a bit for the box1 machine to reset as it realizes
the tunnel is down..

you can then redo the ssh...

but it will still timeout!!

i've changed the ssh_config on the vm1
i've changed the sshd_config on the box1 box

-------------------------------------------

however, I'm getting timeouts on the box1. I can wait a few mins. and
then the term for the box1 hangs.

I can kill the ssh/reverse process on the vm, and the box1 will
eventually reset, where I can then get into the box1 again..

I'm trying to figure out what config parameters should be set in the
ssh_config/sshd_config for both the vm1 and box1 processes...

I'd like to be able to access the box1 and not do any action, and have
the term be active (no hangs) 20 mins later!!


thanks


More information about the users mailing list