reverse_ssh_tunnel icon indicating copy to clipboard operation
reverse_ssh_tunnel copied to clipboard

Problem when user's ip changes

Open ozanAta opened this issue 9 years ago • 2 comments

Hi, Let's say i want to create a reverse tunnel to server b from a machine a with using this script on machine a. After tunnel is on, what would happen if the ip of machine a changes ?

ozanAta avatar Dec 02 '16 14:12 ozanAta

I tried this script, yes it does automatically create a tunnel to server, but when the ip of device a changes, i cant access it from the server

ozanAta avatar Dec 02 '16 15:12 ozanAta

I don't think AUTOSSH_PORT is ever passed to autossh, you can try exporting the variable or better yet rely SSH keepalives with ServerAliveInterval and ServerAliveCountMax options.

If you're using a Debian-based distribution, you can also try sidedoor, my small wrapper package to maintain an SSH connection/tunnel.

daradib avatar Dec 03 '16 20:12 daradib