Securing SSH on Debian Sarge

Soldato
Joined
18 Oct 2002
Posts
7,520
Location
Glasgow
I've setup my Epia server at home to allow SSH logins on port 22 from a standard user account that I've created. I have setup the ssh_config file to DenyUser root, DenyGroup admins and AllowUser <user account>. I've also set it up to accept connections from my internal network 192.168.0.0, my work network and my workstation here (as I'm not sure how the proxy works yet).

Is there anything else I can do to secure SSH? I've had a few "hacking" attempts since I set it up so I think at the moment I've done all I can. I have a strong password (8 characters, mix of upper/lowercase & numbers) and setup Cron to apt-get update/upgrade every night, though maybe that's a bit risky if anything goes wrong. I could change the listen port on SSH to something else though I doubt it'll do much?

I also have ClamAV running a full scan at midnight as I also have Samba installed to accept from 192.168.0.0.
 
Last edited:
you could use ssh keys instead of a password. the keys can be protected by a phasephrase which is harder to bruteforce than a password.
 
If you haven't already, you can firewall port 22 off for everywhere except the addresses you will be connecting from, and use SSHD: ip.add.re.ss lines in /etc/hosts.allow, along with denying SSHD: ALL in /etc/hosts.deny.

That what I have on my home server aswell as sshd_config, and reduces ssh login attempts to attempts to connect on port 22 which fail.
 
I've changed the port now to something else more vague. I'll have a look at SSH keys for users as well.

Thanks everyone for the help. :)
 
Back
Top Bottom