Restricting ssh

Mike Zingale zingale at gmail.com
Fri Jan 7 15:49:27 UTC 2011


2011/1/7 Markus Schönhaber <fedora-users at list-post.mks-mail.de>:
> 07.01.2011 00:28, Timothy Murphy:
>
>> I have an sshd server running on a machine in Ireland.
>>
>> Can I configure it so that it only accepts connection
>> from certain machines, wherever they may be in the world?
>

I uses /etc/hosts.deny and /etc/hosts.allow to do this.  In
/etc/hosts.deny I have

ALL:ALL

(though, you might want it to just be sshd: ALL).

Then in hosts.allow, I have a line like

sshd: .domain.com

for each of the domains or machines I want to grant access.  This
seems to work well.


More information about the users mailing list