How can I specify that SSH only use one IP address?

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

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct