1、下載xshell工具
2、阿里云控制臺設定登錄密碼

3、xshell工具登錄成功后,配置本地電腦生成的ssh公鑰
[root@iz0kolfnl .ssh]# cd ~/.ssh
[root@iz0kolfnl .ssh]# ls
authorized_keys
[root@iz0kolfnl .ssh]# vi authorized_keys
4、編輯ssh組態檔
[root@iz0kolfnl .ssh]# cd /etc/ssh/
[root@iz0kolfnl ssh]# ls
moduli sshd_config ssh_host_dsa_key.pub ssh_host_ecdsa_key.pub ssh_host_ed25519_key.pub ssh_host_rsa_key.pub
ssh_config ssh_host_dsa_key ssh_host_ecdsa_key ssh_host_ed25519_key ssh_host_rsa_key
[root@iz0kolfnl ssh]# vi sshd_config
PasswordAuthentication no //禁止使用基于口令認證的方式登陸,默認yes,可選項
PubkeyAuthentication yes //允許使用基于密鑰認證的方式登陸,必選項
RSAAuthentication yes # 啟用 RSA 認 ,可選項
AuthorizedKeysFile .ssh/authorized_keys # 公鑰檔案路徑,可選項
PermitRootLogin yes # 禁止root遠程登錄,可選項

5、重啟sshd服務
[root@iz0kolfnl ssh]# /bin/systemctl start sshd.service
6、大功告成
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/271541.html
標籤:其他
上一篇:zabbix二進制軟體包安裝
下一篇:作業站顯卡驅動重裝
