Windows连接Linux做开发的安装和配置
Windows连接Linux做开发的安装和配置
使用VSCode连接Linux虚拟机
VSCode的下载和安装。https://code.visualstudio.com
点击左边:扩展
中文插件:Chinese (Simplified)(简体中文)Language Pack
安装和配置Remote SSH,连接远程的Linux服务器。
SSH插件:Remote -SSH
左下角-> 远程主机-> 点击连接图标-> connect to host -> configure ssh hosts -> c:…ssh/config ->
host:IP地址
hostname:IP地址
user:用户名
最后保存
左下角-> 远程主机-> 点击连接图标-> connect to host -> configure ssh hosts -> IP地址 ->
出现新的窗口-> continue -> 用户密码 ->
插件C/C++:
Linux远程:https://www.xshell.com/
xshell:系统管理
xftp:文件管理
连接不上虚拟机的原因可能是没有安装ssh服务
安装方法:
对于基于Debian的系统(如Ubuntu):
打开终端,然后运行以下命令:
sudo apt-get update
sudo apt-get install openssh-server
对于基于RPM的系统(如CentOS):
打开终端,然后运行以下命令:
sudo yum update
sudo yum install openssh-server
启动SSH服务:
sudo systemctl start sshd
设置SSH服务开机自启:
sudo systemctl enable sshd
查看SSH服务:
sudo systemctl status sshd