Hacker News new | ask | show | jobs
by steve19 5578 days ago
Restrict root login from a particular IP address

AllowUsers root@112.113.114.115

I use AllowUsers to ensure only users I want can login from SSH.

1 comments

But what if your IP address changes?
Root login shouldn't be your normal entrance. For maintenance stuff use sudo-capable regular user account with public key authentication. If there's some software that requires root login and you cannot do anything about it, enable root login and allow it only from the specific IPs.