1、添加配置文件
ctrl + shift + p
:打开配置文件
在配置文件中添加下述信息。
Host JumpMachine
# 跳板机的ip地址
HostName A
# 你跳板机的用户名
User username
# 跳板机登录端口
Port 22
Host TargetMachine
# 目标机的ip地址
HostName B
# 你目标机的用户名
User username
# 目标机登录端口
Port 22
ProxyCommand "openssh的安装路径"\ssh.exe -W %h:%p JumpMachine
# C:\Windows\System32\OpenSSH\ssh.exe
2、设置免密登录
https://blog.csdn.net/dujidan/article/details/115915639
3、链接登录
参考:
https://zhuanlan.zhihu.com/p/103578899