Skip to content

Instantly share code, notes, and snippets.

@nishinoshake
Created May 30, 2016 10:25
Show Gist options
  • Save nishinoshake/2d1c3725f6798162470a1d296017fa0f to your computer and use it in GitHub Desktop.
Save nishinoshake/2d1c3725f6798162470a1d296017fa0f to your computer and use it in GitHub Desktop.
ポートフォワーディングがよくわからん

#ポートフォワーディングとは ローカルの特定のポートをどっかに結びつける。
SSHで踏み台サーバから本番にアクセスしたい時なんかに使う。

# ローカルの12345ポートを
# ターゲット(ttt)のポート22と
# proxy経由で繋いであげる
ssh -L 12345:ttt.ttt.ttt.ttt:22 -i keyname.pem [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment