找回密碼
 註冊
搜索
查看: 832|回復: 0

[AlamLinux] linux server如何用 ssh-key 連線

[複製鏈接]
發表於 2026-5-5 23:39:54 | 顯示全部樓層 |閱讀模式
Push to Facebook
1. 在CPanel 帳戶產生新的金鑰

linux server ssh-key

linux server  ssh-key



2. 下載 私鑰

linux server ssh-key

linux server  ssh-key



3. 安裝 Putty 及 PuTTYgen
執行PuTTYgen 讀取下載的私鑰

linux server ssh-key

linux server  ssh-key





轉換成PPK檔案,輸入通關密碼,轉存PPK檔案




4. 打開Putty
輸入IP
點 DATA -> 輸入 帳號

linux server ssh-key

linux server  ssh-key

點 SSH -> Auth -> Credentials -> 匯入私鑰 xxx.ppk

linux server ssh-key

linux server  ssh-key


最後點OPEN -> 輸入密碼 即可

linux server ssh-key

linux server  ssh-key


最後關閉 密碼連線

修改 SSH Server 的 config 並重啟。
把 /etc/ssh/sshd_config 檔案裡的 PasswordAuthentication 設為 no
PasswordAuthentication no
重啟 SSH Server
  1. sudo service ssh restart
複製代碼
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

Archiver|手機版|小黑屋|TShopping

GMT+8, 2026-5-13 09:46 , Processed in 0.022203 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回復 返回頂部 返回列表