|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > System Administration > Security and Cryptography > Can I limit ssh logins to one hostname? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|