Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 01-27-2005, 04:33 AM   #1
Registered: Aug 2001
Location: Hong Kong, China
Distribution: CentOS, Red Hat, Mandrake, Debian
Posts: 88

Rep: Reputation: 15
Question How to setup a host.deny and host.allow for SSH?

Hi all,

I am using Windows XP with the cygwin + OpenSSH to build up a SFTP Server.

But for some reason, I don't want to build a linux box for a standalone SFTP server.

I want to ask, how to set up a host.deny for deny all internet user can login to the SFTP server, but if I want just one IP, for example, this IP can login to the SFTP Server?

How to? And need enter what inform to the host.deny and host.allow file??


Jimmy Chan
Old 01-28-2005, 02:12 PM   #2
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30

Old 01-31-2005, 05:28 PM   #3
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
The hosts.allow file is checked before hosts.deny, so make sure the rules don't conflict. Allowing things should be in the allow-file, like:
sshd: or
sshd: ALL: spawn (echo "Attempt from %h %a to %d at `date` by %u" | tee -a /var/log/sshd.log)

The last line also logs any attempts.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deny a host access to all services objorkum Linux - Networking 5 08-17-2007 02:54 PM
Host in hosts.deny able to access HTTP service mikebalcos Linux - Networking 1 08-12-2004 09:40 AM
Quick quide to host.allow / deny? dtournas Linux - General 2 06-19-2004 06:17 AM
How do I deny host? Inexactitude Linux - Security 3 02-22-2004 02:00 PM
host.deny is very wierd ForumKid Linux - Security 1 12-26-2001 06:09 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration