mumumuの日記: ssh port forwarding
日記 by
mumumu
ssh -R port:host:hostport remote
remote:port ==ssh=> localhost:any-unprivilegged ---> host:hostport
----
ssh -L port:host:hostport remote
localhost:port ==ssh=> remote:any-unprivilegged ---> host:hostport
----
今まで大きな勘違いをしていたのでメモ。ただ、-Rを使う場合、
remoteのホストでportをlistenする、、はずなのだが、うちの
環境ではremoteのlocalでしかlistenしてくれていない。その
設定はどうやるのかを調べ中。
[ Update June 11th 20:45 JST by m ]
sshd_configのGatewayPortsをyesにしたら繋がりますた。
sshd_configのGatewayPortsは、ssh -Rを実行している
remoteのportを他のホストに対してもlistenするかどう
かを指定する。
ssh_configにもGatewayPortsが存在する。これもportを他
のホストに対してもlistenするという点は同じだが、ssh
-Lを実行しているホストのportが空く点に注意。
forwardのサービスに使えるかと思います。ご教授頂いた
umqさめに深く感謝しますm(_ _)m
ssh port forwarding More ログイン