ssh如何建立安全跳板机?
更新:HHH   时间:2023-1-7


环境centos7两台

跳板机: eth0:X.X.X.X

     eth2:10.165.93.161

内网主机:eth0:10.165.93.162


ssh -4fg -L 2222:10.165.93.162:22 -N localhost

解析:

-4  以ipv4地址格式

-f  后台运行

-g  允许远程主机进行连接本地端口2222

-L [bind_address:]port:host:hostport

-N  Do not execute a remote command.  This is useful for just for-

             warding ports (protocol version 2 only).

ssh x.x.x.x:2222  即可登录内网主机


返回安全技术教程...