I want to connect from my laptop to home server (both run some Linux; notice I explicitly want my user to be able to become root, in order e.g. to install new software): the server has the following sshd_config
:
AllowUsers <zzz-my-user>
PermitRootLogin no
HostKey /etc/ssh/ssh_host_rsa_key
ChallengeResponseAuthentication no
PasswordAuthentication no
# PubkeyAcceptedKeyTypes ssh-rsa*
LoginGraceTime 8
X11Forwarding no
PrintMotd no
MaxStartups 2:30:10
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
on the client I acted with
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -o -t rsa -b 4096
and then added the public key in the server at .ssh/authorized_keys
, where I also acted with
sudo ssh-keygen -o -N '' -b 4096 -t rsa -f /etc/ssh/ssh_host_rsa_key
Do you think this minimal procedure and configuration might guarantee a reasonable security level? Would you suggest any improvements?