写简单点
先说下大概流程
本地 访问 localhost:6000 --> 转发到跳板机:22 --> 再转发到指定内网地址
本机 .ssh/config
Host *
ControlPersist yes
ControlMaster auto
ControlPath ~/.ssh/%n:%p
本机公钥 copy 到跳板机 和内网被跳机
本机命令
ssh -N -f -L 6000:<内网服务器ip>:22 -p <跳板机端口> username@<跳板机ip> -o TCPKeepAlive=yes
好了 第一件事完毕 本地已经可以直接登陆到远程被跳机了
ssh -p 6000 root@localhost

使用dlv调试
安装dlv
go install github.com/go-delve/delve/cmd/dlv@latest
echo alias dvl='/root/go/bin/dlv' >> .bashrc
source .bashrc
## 使用方式
dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient

4361

被折叠的 条评论
为什么被折叠?



