环境搭建
vscode安装和插件安装
Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code
Eino
Go
Lingma
Remote ssh
linux上配置
sshd_config配置
echo "X11Forwarding yes" >> /etc/ssh/sshd_config
echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config
go环境配置
echo "export PATH=$PATH:/root/go/bin:/usr/local/go/bin"
go env -w GOPROXY='https://goproxy.cn,direct'
cd /path/to/project
go mod tidy
remote ssh配置
################### 直连 #########################
Host 192.168.137.57
HostName 192.168.137.57
User root
ForwardAgent yes
IdentityFile C:\\Users\\quanag\\.ssh\\id_ed25519
################### 转发 #########################
# 堡垒机配置
Host bastion
HostName 8.148.238.15
User root
Port 60022
IdentityFile C:\\Users\\quanag\\.ssh\\id_ed25519
# 目标服务器配置
Host 192.168.3.34
HostName 192.168.3.34
User root
Port 22
ProxyCommand ssh -W %h:%p bastion
IdentityFile C:\\Users\\quanag\\.ssh\\id_ed25519
debug配置
{
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/einoagent" // main.go的目录文件
}
]
}