vscode 远程连接

这里记录的是修改ssh配置文件的方式远程连接服务器中的docker服务器

假如已经创建好了docker,并已经启动

  1. config ssh in dev container

/etc/ssh/sshd_config中修改 PermitRootLogin in

bash 复制代码
把 PermitRootLogin prohibit-password 修改为 PermitRootLogin yes

同时把 /etc/ssh/sshd_config 中的ssh端口修改了,具体如下

bash 复制代码
把 Port=22 修改成 Port={change your ssh port}
  1. 设置密码
bash 复制代码
passwd root
  1. 在docker中重启服务器
bash 复制代码
service ssh restart
  1. vs code连接远程服务器
相关推荐
爱叨叨的小嘟20 分钟前
windows配置C++编译环境和VScode C++配置(保姆级教程)
c++·windows·vscode
或许,这就是梦想吧!3 小时前
## jupyter_server
ide·python·jupyter
SCBAiotAigc4 小时前
VSCode debug模式无法跳转进入内置模块
人工智能·vscode·python
巽星石4 小时前
在VSCode中使用Excalidraw
vscode·svg·excalidraw
kissSimple8 小时前
UE行为树编辑器图文笔记
笔记·ue5·编辑器·unreal engine·unreal engine 5
Spider Cat 蜘蛛猫9 小时前
关于vscode中settings.json中的设置
vscode·json·eslint
莫负初10 小时前
Pytest 使用Pycharm右键直接运行测试脚本正常,控制台命令pytest运行收集不到用例无法正常测试 no tests ran in 0.01s
ide·pycharm·pytest
Zww089111 小时前
idea插件市场安装没反应
java·ide·intellij-idea
hallo12816 小时前
vscode环境迁移
ide·vscode·编辑器
家有狸花16 小时前
VSCODE驯服日记(三):配置C++环境
c++·ide·vscode