Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have SSH installed, and UCARP configured to fail over a virtual IP when one of the two boxes goes down. The problem that I'm having is when a VM is running, and the ucarp interface is active (eth0:ucarp), I cannnot ssh to the VM using the eth0 address; I can only get to it using the eth0:ucarp address.

I used this guide to set up UCARP:

Is there a way to configure ssh to only run on eth0, or make eth0 the 'primary' interface for ssh? Right now, if I try to ssh to the eth0 address, there is no response (the connection times out).

Here is my /etc/networking/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    # standard config

    # ucarp config
    # vid: the ID of the virtual server [1-255]
    ucarp-vid 1
    # vip: the virtual IP
    # password
    ucarp-password info322
    # advskew: Advertisement skew [1-255]
    ucarp-advskew 1
    # advbase: Interval in seconds that advertisements will occur
    ucarp-advbase 1
    # master: determine if this server is the master
    ucarp-master yes

# The carp network interface, on top of eth1
iface eth0:ucarp inet static
share|improve this question
Do you get any errors from the firewall mentioning martians or that something is blocked in /var/log/messages, syslog or dmesg? – Jure1873 Nov 6 '13 at 20:19
If you really need it to listen to one ip only you can put ListenAddress into the sshd configuration file. – Jure1873 Nov 6 '13 at 20:21
Does ucarp make eth0 unavailable when a node is the primary? I can't ping eth0 unless I take eth0:ucarp down. – EGr Nov 11 '13 at 15:56
You will have another problem with SSH hostkeys. You may want to install the same hostkey on each ssh server or otherwise tell your clients to ignore the problems/mismatches. – dmourati Nov 11 '13 at 18:10
ucarp shouldn't make the main interface unavailable. What messages do you get when you ping? Do you have a firewall enabled? This is strange. You could try keepalived and see if you have more luck with that. – Jure1873 Nov 11 '13 at 20:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.