1、想实现功能
通过win11的VScode控制另一台电脑deepin系统。
2.步骤
1)在vscode中安装Romote-SSH插件
2)打开配置文件
image.png
image.png
image.png
3)配置文件添加下面内容:
config文件内容:
Host Deepin #随意名字
HostName 192.168.10.40 #deepin地址
User username #deepin主机用户名
3、出现问题
添加后进行连接,提示错误:could not establish connection to "Deepin".......
4、解决方法
参考了知乎解决方法,我个人是第二个方法解决,添加了PermitRootLogin
解决方法一:
将C:\Users\用户名.ssh目录中的known_hosts删除,再尝试连接。
解决方法二:检查ubuntu中ssh是否安装正确
1、安装:sudo apt-get install openssh-server
2、配置:sudo vi /etc/ssh/sshd_config 找到PermitRootLogin后面改为yes
3、重启ssh:/etc/init.d/ssh restart
再尝试连接。
解决方法三:
在vscode插件remote-SSH右键,点击扩展配置,将config的路径填入,再尝试连接。