LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-16-2006, 12:14 AM   #1
Joshsmac
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
Ssh


is there a way in linux to secure sshd in such a way that there is a max number of tries to login and the ip is either banned temporarily for a set time or permanently?

basically to keep some guy from some ip trying multiple user names to guess a login. I don't know what thats called but thats what i would like to prevent.
 
Old 04-16-2006, 01:16 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Try looking in the "man 5 sshd_config" manpage. There are options to allow and deny users. Also, your system may also use PAM authentication.

I don't know if this would work by you could try "DenyUsers *@<ipaddress>"

Try to do a reverse lookup on the IP address. If it is successful, then you can use "DenyUsers *@HisHostname"

Also, if you know from the logs what his IP address is you could block it at the firewall. This will prevent him from attacking other services.
 
Old 04-17-2006, 04:59 AM   #3
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Read http://www.linuxquestions.org/questi...=340366&page=3

Capt_Caveman mentioned http://denyhosts.sourceforge.net/features.html which has the ability to temporary deny hosts. (haven't tested it myself)
 
  


Reply


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
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 12:53 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 01:34 PM
I turned off SSH, but I cant get it back! How do you start SSH on boot? nmoog Slackware 2 02-08-2004 06:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:29 PM.

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