How can I specify that SSH only use one IP address?
Linode
Linode Staff
I have 2 public IPv4 addresses on my Linode and I'd like to make sure that only one of them can be used for SSH access. How would I accomplish this?
1 Reply
Britchey
Linode Staff
You can use the ListenAddress parameter within the /etc/ssh/sshd_config file to specify a particular IP address for the SSH server to listen on:
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
So, if you'd like you SSH to only listen on the IPv4 address 192.168.10.10 you would add this parameter:
ListenAddress 192.168.10.10