环境:
服务器:Ubuntu 20.04(被远程连接一端)
主机:WIN10
Ubuntu配置:
1.用如下命令安装ssh服务器
sudo apt install openssh-server
2.修改配置文件允许建立连接
sudo vim /etc/ssh/ssh_config
去掉PasswordAuthentication yes前面的#
sudo vim /etc/ssh/sshd_config
在PermitRootLogin prohibit-password前添加#,同时在其下方添加
PermitRootLogin yes
3.ssh连接
使用ifconfig查看服务器ip
ifconfig
在主机的命令行中进行连接
ssh abolo@192.168.80.129
输入密码,连接成功