0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

踏み台に本番サーバへポートフォワーディングさせてHTTP通信する

Last updated at Posted at 2021-04-21

久々の投稿。

踏み台を経由して本番サーバにSSHして作業することは多いのですが
たまに本番サーバに入っているzabbixなどのWEBのコンソール画面を開きたくなります。
踏み台でポートフォワーディングすればよいのですが、sshのオプションをよく忘れるのでメモしておきます。


ssh -g -N -L [踏み台の空いてるポート]:[接続先IP]:[接続先ポート番号] hoge(sshconfigの名前)

なお、踏み台で使っていないポート番号はXXXXにポート番号を入力して何も表示されなければ開いてるポートとなる。


netstat -an | grep XXXX
または
ss -ant | grep XXXX
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?