I'm setting up Keepalived for automatic IP failover between two servers, but I'm running into a problem. Whenever I start Keepalived, it seems to block my SSH connections. Here's the configuration I'm using on both servers:
On VM-00:
- It's set as BACKUP with a virtual IP address of 10.0.0.222.
- Using a script to check Docker status.
And similarly on VM-01:
- Also set as BACKUP with the same virtual IP.
I've configured global definitions and everything looks correct, but I'm having no luck. Any ideas on what could be causing the SSH blockage?
1 Answer
This might be related to your SSH daemon configuration. Try checking if your sshd is configured to bind to 0.0.0.0 or your specific IPs. If the expected IPs aren't ready when SSH tries to start, it can cause connection issues. You could also try using verbose mode in SSH to check where it hangs when you try connecting.
So I ran a verbose SSH command and it gets stuck after connecting. It seems like the SSHD isn't properly listening on the expected IP. Making sure it's bound to the right addresses might solve the issue.