|
||||||
| Tutorials, Guides and Tips Member submitted guides, tips, tricks and howtos. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
||||
|
If you run a server and have a popular website (or bad friends) you will probably want to make your SSH connection more secure. If you have any logon failure alerts or brute force detection methods you may notice your server gets attacked several times a day. This server, when using the default SSH port, gets about 10 brute-force attempts per day.
This tutorial will show you some of the ways you can make SSH more security. Change the Default Port The default port for SSH is 22. This is the first port an attacker will try when attempting to break in and is very easy to fix by simply changing it. To fix follow these steps:
Note: If you run a firewall make sure you open the new port. Lets continue, keep the sshd_config file open and follow the next steps. Protocol 1,2 SSH has two protocol, 1 and 2. Protocol 1 is less secure so you should not use it.
Root Login You should never allow root to login remotely. Most attacks will try to gain root access so disabling root login will prevent them from getting very far if they somehow gain the root password. You'll need to disable this in your sshd_config file as well:
Making it harder Since most attacks will come from a brute force script kiddie you will want to limit the number of attempts they can enter a password. If you don't limit this number or if you keep the number fairly high the skiddies will try again and again and again. Changing the port above will also thwart a lot of these attacks but if an attacker discovers your new port this setting should be low. To limit the number of attempts:
Key Logins Only - Important! If you only allow SSH key-based logins brute force attacks will be useless (as the main purpose of a brute force attempt is to discover your password and login). You will need to generate a public/private key combination in order for this to work. Here is how to enable keys and disable password authentication:
Other Options Here are some other tips that may help make SSH and your server more secure:
|
| Sponsored Links |
![]() |
| Tags |
| remote connection, secure, secure shell |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The most secure Linux? | EugenS | Linux Security | 8 | 06-27-2008 09:29 PM |
| Making your Linux look like Vista | Hektor | Linux Applications | 8 | 10-23-2007 07:18 PM |
| Making a bootdisk | C3P0 | Linux Applications | 1 | 10-22-2007 02:36 PM |
| Make my Server more secure | Grub | Linux Security | 4 | 10-07-2007 02:23 PM |
| Making My Grandparents Leet Linux Users - Part 3 | kernel | Linux News | 0 | 08-22-2007 08:37 PM |