当前位置:网站首页>SSH 通过跳板机连接远程主机
SSH 通过跳板机连接远程主机
2022-04-23 14:10:00 【世宝宝】
有两种方式可以选择,包括 ProxyJump 和 ProxyCommand 。
ProxyJump 是通过端口转发的形式,需要跳板机支持端口转发。
ProxyCommand 是通过SSH协议转发
就安全性来说,ProxyJump是比较高的,因为他是端到端加密,跳板机是透传只做转发,可能性能也较好。
下面是两种方式的例子,其中包括了经过多个跳板机中转及使用证书登录的情况,Host1是已预置了本地用户的证书(这也是通常的方式),通过修改配置文件 .ssh/config 实现:
Host Host1
HostName 192.168.0.1
Port 22
User yourusername
Host Host2
HostName 192.168.0.2
Port 22
User yourusername
IdentityFile ~/xxx.pem
ProxyJump Host1
Host Host3
HostName 192.168.0.3
Port 22
User yourusername
IdentityFile ~/xxx.pem
ProxyJump Host2
Host Host1
HostName 192.168.0.1
Port 22
User yourusername
Host Host2
HostName 192.168.0.2
Port 22
User yourusername
IdentityFile ~/xxx.pem
ProxyCommand ssh Host1 -W %h:%p
Host Host3
HostName 192.168.0.3
Port 22
User yourusername
IdentityFile ~/xxx.pem
ProxyCommand ssh Host2 -W %h:%p
版权声明
本文为[世宝宝]所创,转载请带上原文链接,感谢
https://blog.csdn.net/0210/article/details/117805705
边栏推荐
- GFS分布式文件系统(理论)
- Get the thread return value. Introduction to the use of future interface and futuretask class
- MySQL数据库讲解(九)
- std::map 和 std::vector 内存释放
- Wechat applet communicates with low-power Bluetooth - sending data to hardware (III)
- js 键值判断
- 線程組ThreadGroup使用介紹+自定義線程工廠類實現ThreadFactory接口
- HyperBDR云容灾V3.2.1版本发布|支持更多云平台,新增监控告警功能
- json date时间日期格式化
- win10自带Groove音乐不能播放CUE和APE文件的一种曲线救国办法,自己创建aimppack插件包,AIMP安装DSP插件
猜你喜欢
随机推荐
剑指offer刷题(1)--面向华为
MYSQL一种分表实现方案及InnoDB、MyISAM、MRG_MYISAM等各种引擎应用场景介绍
Jira截取全图
How to do a project easily
教育行业云迁移最佳实践:海云捷迅使用HyperMotion云迁移产品为北京某大学实施渐进式迁移,成功率100%
JDBC详解
Visio installation error 1:1935 2: {XXXXXXXX
GFS分布式文件系统(理论)
Recyclerview advanced use (II) - simple implementation of vertical drag and drop sorting
Essential difference between restful WebService and gSOAP webservice
如何轻松做好一个项目
金融行业云迁移实践 平安金融云整合HyperMotion云迁移解决方案,为金融行业客户提供迁移服务
ActiveMQ Basics
How does void * exist?
How QT designer adds resource files
线程间控制之Semaphore使用介绍
gif转为静态图片处理
Logback logger and root
时间复杂度计算举例
什么是云迁移?云迁移的四种模式分别是?