Lockdown SSH with TCPWrappers

From Acenet Knowledgebase
Revision as of 15:02, 22 July 2015 by Docs admin (talk | contribs) (Docs admin moved page Lockdown SSH with TCPWrappers (CentOS to Lockdown SSH with TCPWrappers)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To ensure SSH access is not lost during this process you will need to add your IP to the allow list.

Access the server via command line

Edit the file

/etc/hosts.allow

After the comment lines add

sshd : YOURIP

So for example if your IP is 198.198.198.198, The line should look like this

sshd : 198.198.198.198

After you have added your IP to the allow list you can block other SSH access to the server.

Edit the file

/etc/hosts.deny

After the comment lines in this file add

sshd : all

SSH access should then be restricted to only your IP.

You can confirm the restriction is in place by attempting to SSH from any other host.