vi /etc/ssh/sshd_config

UseDNS no
AddressFamily inet
SyslogFacility AUTHPRIV
PermitRootLogin yes
PasswordAuthentication yes

RSAAuthentication yes
PubkeyAuthentication yes
PermitEmptyPasswords yes
StrictModes no
AuthorizedKeysFile      .ssh/authorized_keys

systemctl restart sshd.service

ssh-keygen -t rsa

vi ~/.ssh/authorized_keys

ssh root@ip:22

标签: none

添加新评论