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 ::

So, if you'd like you SSH to only listen on the IPv4 address you would add this parameter:



Please enter an answer

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] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct