Re:Ask HN: Anonymous person sent proof of SSH access to our ...
by king_phil on Wednesday July 27, 2016 @12:12PM
(#12174025)
IMHO you can skip most of this except #2. Key-only login is very important, blocking access with fail2ban not so much. But you definitely need to send your logs to another box so you got a copy (that is unreachable for the attacker) of the logs that this guy definitely removed from the hacked system.
[ Parent
| on HN ]
Re:Ask HN: Anonymous person sent proof of SSH access to our ...
by laumars on Wednesday July 27, 2016 @12:29PM
(#12174201)
I do agree but a lot of it depends on the business case. Sometimes the business requirements dictate you have password authentication enabled. :(
You're right that key only logins are the easiest quick win, but it's also worth remembering that they can still be vulnerable if the box needs passphraseless keys (eg lazy automation) or if you cannot guarantee the security of those keys (eg they're generated by third parties and/or stored on third party systems). In those situations it would pay to firewall SSH and specifically whitelist the third parties IP address.
Good suggestion about the logs too. That's an often forgotten step yet invaluable when it comes to forensics.