Security and Cryptography
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationSecurity and Cryptography

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 27th, 2005, 01:26 PM
prov prov is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Providence, RI
Posts: 59 prov User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 28 m 45 sec
Reputation Power: 5
Can I limit ssh logins to one hostname?

Hi,

I am running a server, and since it contains a number of websites, it uses a number of hostnames, including its IP address, of course.

I've been receiving a number of login attempts to username: root, among others, and one of the ways I thought of combatting this was to limit all ssh requests to a single hostname that is not used anywhere else (such as sshlogin.domain.tld)

Is there a way to restrict all ssh requests to a specific hostname?

Reply With Quote
  #2  
Old December 27th, 2005, 01:48 PM
stdunbar stdunbar is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: May 2004
Location: Superior, CO, USA
Posts: 1,741 stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level)stdunbar User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 2 h 36 m 13 sec
Reputation Power: 381
Send a message via ICQ to stdunbar Send a message via Yahoo to stdunbar
You can have sshd listen to a particular IP and port. Take a look at the sshd_config man page and look for ListenAddress option. It looks like you can do something like:

Code:
ListenAddress 123.456.789.012:22


to listen on a particular IP address at the default port.

But realize that you're only moving the problem. People will still try to probe the ssh port regardless of the host name. Mostly the host name is irrelevant - they only go after the IP anyway.

If you can't restrict the IP's that are allowed to access the machine via ssh (i.e. only allow a few machines to even see that the host has an open ssh port using iptables) then make sure you keep up with patches, don't allow direct root login, and have good passwords for any account that you do allow logins to.
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.

Reply With Quote
  #3  
Old December 29th, 2005, 05:55 PM
prov prov is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Providence, RI
Posts: 59 prov User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 28 m 45 sec
Reputation Power: 5
Okay, thanks.

I was thinking you could somehow configure it so SSH will not allow connections to simply its IP, but a specific hostname.

I guess I'll be using keygens then.

Reply With Quote
  #4  
Old January 20th, 2006, 04:41 PM
Ergo12 Ergo12 is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Location: trolls only :)
Posts: 172 Ergo12 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 20 h 5 m 11 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
ssh security :-

- disable root login
- use allowusers joel (where joel is a non priv user UID >500)
- use port-knocking or move the port to a non-standard port
- brute force detector
- denyhosts

etc etc

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationSecurity and Cryptography > Can I limit ssh logins to one hostname?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT