要在SecureCRT中配置Ubuntu SSH密鑰認證,請按照以下步驟操作:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
~/.ssh/id_rsa.pub
)內容復制到SecureCRT的會話屬性中。為此,請點擊“Browse”按鈕,然后選擇本地計算機上的公鑰文件。.ssh
目錄,如果不存在:mkdir -p ~/.ssh
.ssh
目錄中:ssh-copy-id -i ~/.ssh/id_rsa.pub username@your_server_ip
~/.ssh/authorized_keys
文件中,并確保權限設置正確:chmod 600 ~/.ssh/authorized_keys
按照以上步驟操作后,您就可以使用SecureCRT通過SSH密鑰認證的方式安全地連接到Ubuntu服務器了。如果登錄不成功,請檢查服務器上的SSH配置文件/etc/ssh/sshd_config
,確保以下設置正確:
PubkeyAuthentication yes
RSAAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
并重啟SSH服務:
sudo systemctl restart sshd