ssh-keygen -t rsa -b 4096 -C "netnr"
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
ssh-keygen -t ed25519 -C "netnr"
https://blog.csdn.net/qq_41664096/article/details/118930458
https://docs.gitlab.com/ee/user/ssh.html
vi /etc/ssh/sshd_config
/Port 22
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
PermitRootLogin without-password
cd ~/.ssh
touch ~/.ssh/authorized_keys
cat id_rsa.pub >> authorized_keys
chmod 700 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
systemctl restart sshd.service
ssh -p 22 -i ~/.ssh/id_rsa root@192.168.100.115
cat /etc/pam.d/sshd
auth required pam_tally2.so deny=5 unlock_time=600 even_deny_root root_unlock_time=600
auth required pam_tally2.so onerr=fail deny=10 unlock_time=1800 even_deny_root root_unlock_time=1800
pam_tally2 -u root
pam_tally2 -u root -r
authconfig --disableldap --update