1.更新 apt-get update
2.安裝 apt-get install openssh-server
3.檢測是否啟動 ps -e |grep ssh
4.如果沒有啟動就手動啟動
/etc/init.d/ssh start
5.配置ssh-server,配置文件位于/etc/ssh/sshd_config,默認端口為22,為了安全,一般自定義為其他端口,然后重啟
sudo /etc/init.d/ssh resart
ssh默認root用戶禁止登陸
PubkeyAuthentication yes #啟用PublicKey認證。
AuthorizedKeysFile .ssh/authorized_keys #PublicKey文件路徑。
PasswordAuthentication no #不適用密碼認證登錄。
傳輸文件
lrzsz包
快捷命令 rz sz