Tom Yates – Web developer based in Manchester
Specialising in PHP, HTML, JavaScript, CSS, Yii, Flash, AS3
Show MenuHide Menu

Restricting SSH Access by IP

May 18, 2012

Two files need updating:

/etc/hosts.allow


sshd : ipaddress : allow

/etc/hosts.deny


# block all ssh apart from those in hosts.allow
sshd : ALL

Command line for speed:

echo sshd : ALL >> /etc/hosts.deny
echo sshd : ipaddress : allow >> /etc/hosts.allow

This can also be achieved from Main >> Security Center >> Host Access Control within WHM

Leave a Reply

Your email address will not be published. Required fields are marked *