Debian 系統默認不支持 Telnet 的加密傳輸
要在 Debian 系統上使用 SSH 進行加密傳輸,請按照以下步驟操作:
sudo apt-get update
sudo apt-get install openssh-client openssh-server
/etc/ssh/sshd_config
文件,確保以下設置是啟用的(刪除或注釋掉前面的 #
):PubkeyAuthentication yes
PasswordAuthentication no
這將禁用密碼身份驗證并啟用公鑰身份驗證。
your_username
替換為您的用戶名:ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
按照提示操作,密鑰將保存在 ~/.ssh/id_rsa
(私鑰)和~/.ssh/id_rsa.pub
(公鑰)文件中。
~/.ssh/authorized_keys
文件中:ssh-copy-id your_username@remote_host
將 your_username
替換為您的用戶名,將 remote_host
替換為遠程服務器的地址。
remote_host
替換為遠程服務器的地址:ssh your_username@remote_host
如果一切正常,您將無需輸入密碼即可登錄到遠程服務器。
現在,您已經在 Debian 系統上使用 SSH 實現了加密傳輸。