SSH Tunnel Password Based Auto Reconnect - Programming On Unix

Users browsing this thread: 2 Guest(s)
venam
Administrators
Hello fellow Nixers,
Yesterday, I searched for something that could auto-reconnect my ssh tunnels when using password based encryption.

I did not find anything useful. Everyone use key-based auth.
In my specific case I can't setup my key on the hosts.

When everything fails you write your own solution and that's what I did: https://github.com/venam/SSH-Tunnel-Pass...-Reconnect

If you have a better one it would be nice to know.
xero
Long time nixers
you could write an expect(1) script that looks for disconnects. or if you have admin access to the remotes you could use mosh.
z3bra
Grey Hair Nixers
Plot twist: mosh doesn't need root access. You can just build a static binary, and copy it in your $PATH, or specify the path to the binary on the remote server when starting the client.

But mosh relies on ncurses...
xero
Long time nixers
(25-01-2016, 03:42 PM)z3bra Wrote: You can just build a static binary, and copy it in your $PATH, or specify the path to the binary on the remote server when starting the client.

touche. good to know.