touch ~/.ssh/authorized_keysssh-keygen -t rsacat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keyschmod 600 ~/.ssh/id_rsachmod 700 ~/.ssh/vim /etc/ssh/sshd_configRSAAuthentication yesPubkeyAuthentication yes #key登录方式PermitRootLogin yesPasswordAuthentication yes #密码登录方式systemctl restart sshd
