VS Code 多跳板机连到目标服务器

一、需求

本机 在 vs code 通过多个跳板机连到目标服务器,进行开发

本机(vs code) --> 服务器 jumper 1 --> 服务器 jumper 2 --> 目标服务器 GPU

二、步骤

1、 将本机的公钥复制到所有服务器(跳板机服务器+目标服务器)

a. 在cmd输入

bash 复制代码
ssh-keygen -t rsa -b 4096

b 复制公钥(USERPROFILE.ssh\id_rsa.pub里的内容)到 所有 服务器 ~/.ssh/authorized_keys

2. 安装vs code

找其他教程安装,这略过

3. 安装 ssh插件

4. 配置ssh

点击 齿轮****

点击配置文件

填配置文件 (记得填ip)

bash 复制代码
Host Jump_1  
    HostName Jump_1的ip
    User xx
    IdentityFile ~/.ssh/id_rsa

Host Jump_2
    HostName Jump_2的ip
    User xx
    ProxyJump Jump_1
    IdentityFile ~/.ssh/id_rsa
    ServerAliveInterval 30
    ServerAliveCountMax 1000000

Host GPU_server
    HostName GPU_server的ip
    User xx
    ProxyJump Jump_2      
    IdentityFile ~/.ssh/id_rsa
    ServerAliveInterval 30
    ServerAliveCountMax 1000000

5. 点击使用

相关推荐
门豪杰15 小时前
Ubuntu下安装Claude Code
linux·运维·ubuntu·claude·claude code
新新学长搞科研15 小时前
第五届电子、集成电路与通信技术国际学术会议(EICCT 2026)
运维·人工智能·自动化·集成测试·信号处理·集成学习·电气自动化
桌面运维家15 小时前
Windows/Linux双启动:BIOS/UEFI多配置桌面创建指南
linux·运维·windows
無法複制15 小时前
debian安装Postgresql-14.x
运维·postgresql·debian
阿达_优阅达15 小时前
告别手工对账:xSuite 如何帮助 SAP 企业实现财务全流程自动化?
服务器·数据库·人工智能·自动化·sap·企业数字化转型·xsuite
IMPYLH16 小时前
Linux 的 chroot 命令
linux·运维·服务器
一殊酒16 小时前
【Docker】Docker Desktop 安装指南及汉化教程
运维·docker·容器
克莱因35816 小时前
Linux Cent OS7 at定时任务
linux·运维·服务器
RisunJan16 小时前
Linux命令-make(GNU的工程化编译工具)
linux·运维·gnu
闲猫16 小时前
Linux 历史命令(history)
linux·运维·chrome