SSH Remote Forward

 

man ssh_config:

 

 

Three Test Host: ram5 ram6 ram7 

 

/etc/ssh/sshd_config:

GatewayPorts yes | no

this will dertermin SSHD listen address

 

Command Line:

ssh -fgNR *:555:ram7:80 ram5

ram5 is the SSHD Server (SSHD will listen on 555), ram7:80 is the target

 

 

Configuration File for ssh:

~/.ssh/config

As Remote Forward:

host ram5
    RemoteForward *:5555 ram7:80

this will have the same effect as the above command line.

 

As Dynamic Proxy:

Host ram6
    HashKnownHosts no
    RemoteForward *:555

This will open a socks proxy port on ram6 ( SSHD listen)

 

 

From Windows ssh client(Xshell):

 

 

 

 

 I install nginx on my windows host.

 

Let's try something really cool:

 

 

192.168.8.40 is a virtual host on my windows, where xshell connect to my host on tencent, using Remote Forward, I open a port on the host on tencent cloud, All the hosts on the tencent cloud can connect to my virtual machine on my local windows.

 

 

 

 

相关文章

背景:我已经有一个ssh公钥和私钥了,绑定的是公司的码云但是...
在服务器程序的部署运维过程中,我们经常需要将文件从一个服...
#!/bin/bash#创建一个以.sc结尾的文件,把要操作的主机按顺序...
打开终端安装openssh-server软件包:sudoaptupdatesudoaptins...
环境centos7.9,.NET5一、Jenkins搭建1)下载Jenkins的war包...
dropbear下载地址:https://matt.ucc.asn.au/dropbearelease...