配置
通常使用ping查看网络
如果能ping通,不能ssh登陆,安装
sudo apt update
sudo apt install openssh-server
如果已经安装,查看防火墙状态,inactive(不活跃)
sudo ufw status
sudo ufw allow ssh
sudo ufw reload
查看ssh状态
sudo service ssh status
sudo service ssh start
sudo systemctl start ssh
设置ssh开机自启动
sudo systemctl status ssh
sudo systemctl enable ssh
sudo systemctl restart ssh