Configure SSHD to bind to interface or MAC address?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a small server with two NICs using DHCP (its multi-homed).

eth0 is my control channel, and its where I want to bind SSHD to. eth1 is my interface used for bridging, and routing vm traffic through. Both interfaces get a DHCP address.

eth0 holds the lease for x.x.x.40. I finally got the second interface and bridge configured, and as fate would have it, eth1 got a lease for x.x.x.37. When SSHD starts, it binds to eth1 rather than eth0.

Searching has not been very helpful. Searching for MAC is especially noisy because 'message authentication codes'.

How can I configure SSHD to bind to a particular interface by name or a MAC address?


This configuration was OK when only one interface was available.

$ cat /etc/ssh/sshd_config  

# What ports, IPs and protocols we listen for
Port 22

# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::

# No SSH-1
Protocol 2


Re: Configure SSHD to bind to interface or MAC address?

On 1/29/2016 5:58 PM, wrote:
Quoted text here. Click to load it

Uncomment ListenAddress and bind it to the address of the interface you
want to listen to.

    ListenAddress x.x.x.40

Site Timeline