windows 11子系统中Ubuntu18.04用xhsell无法链接问题

目录

1.查看是否已经安装SSH

2.安装SSH

3.修改SSH配置

4.重启并查看本机IP  

5.通过xhsell链接


1.查看是否已经安装SSH


sudo ps -ef|grep ssh


2.安装SSH


# 更新系统
sudo apt update && sudo apt upgrade -y

# 卸载并安装SSH
sudo apt autoremove --purge openssh-server -y && sudo apt install openssh-server -y

3.修改SSH配置


# 编辑配置文件
sudo vi /etc/ssh/sshd_config

# 取消 Port 22前的# 来开放端口,也可修改为其他端口
Port 22

4.重启并查看本机IP  


安装好SSH后,Ubuntu需要重新启动,重启后还需要启动SSH

#重启需要在服务中重启 LxssManager服务

# 启动ssh
service ssh start

# 查看本机IP
ifconfig

5.通过xhsell链接

你可能感兴趣的:(ubuntu,linux,服务器)