How to SSHD securely

Hi, is there a good way to secure SSHD in a way that only one user at a time can use it and that I can use root access.

Right now I can use a user to login. The user uses both a password and a key.

I use filezilla ftps to access files and update them. The issue is that this user is only allowed to access the folders
that it created. So, it's websites and the home directory of the user.

Which is good. However, I personally don't want to directly login as root. I would rather first login to my user account
and then use su to login to root.

I have the sshd setup to only ally my user to login. I also have port 22 firewalled so that only any one within my network
can access port 22. Anyone outside my network would get blocked.

I just want to know what I can do? Also what is the best way to avoid allowing someone on the internet to have root access.
I don't want this to happen.
 
Root login should be disabled by default according to sshd_config().

I am not aware how to restrict to only one user at a time but you can also use

AllowGroups or AllowUsers to restrict ssh login to specific users.

Have a look at the mentioned man page about what is possible.
 
Back
Top