一、在目标计算机(即被连接的计算机)上操作:
1、安装 OpenSSH 服务器:
sudo apt update
sudo apt install openssh-server
3、启动并设置 SSH 服务开机自启:
sudo systemctl enable --now ssh
二、在源计算机(发起连接的计算机)上操作
1、安装 OpenSSH 客户端:
sudo apt update
sudo apt install openssh-client
2、使用 SSH 连接目标计算机:
ssh username@192.168.1.100(换成你自己要连接的设备名称和IP)
可以通过以下命令查看设备名称:
whoami