HPCHOST

Client Login Client Login

How do I make my SSH server only listen on the private network?

You can further secure your server by running SSHd only on the backend network. This means you will need to connect to the VPN every time you need to access SSH. For more information on how to connect to the VPN, refer to [How do I connect to the VPN?]

The following file allows you to define the IP for sshd:
# nano /etc/ssh/sshd_config

Locate the line with "ListenAddress 0.0.0.0". If it begins with a '#' character, remove this character. Set the IP address to the IP you would like it to listen on. You can find your internal IP address by selecting "Hardware" from the Softlayer Management Portal.

After making the change, you will need to restart the ssh service:
# service sshd restart

Your current shell window will not disconnect when restarting the service. We recommend testing that you are able to connect to the server over your new SSH port before exiting your current shell window. If there is a problem, SSHd will fail to restart and you will need to connect to the server via an alternative method.



Was this answer helpful?

Add to Favourites
Print this Article

Also Read



Close Chat
HPC Host Live Chat