I have an SSH server where multiple clients SSH in to maintain a bunch of port forwards.
What I want to do is, if the server goes down, have the clients automatically connect to the next server.
The question is, how would this be accomplished?
I have an SSH server where multiple clients SSH in to maintain a bunch of port forwards.
What I want to do is, if the server goes down, have the clients automatically connect to the next server.
The question is, how would this be accomplished?
If you have access to the clients configuration you can use autossh
on their side to handle reconnects (to the same IP, that is - autossh doesn't handle reconnects to different servers).
On the server side I'd say you have multiple options - you can take a look at Heartbeat - it's the simplest solution I'm aware of. This is assuming you can move at least one IP reachable from the clients from server to server.
If you can't you should probably take a look at Linux Virtual Server, in which you use one or more servers as front ends. It's designed primarily for load balancing instead of failover but I think it can be fitted partially to your needs.