7
6

More than 5 years have passed since last update.

一行野郎:sshで踏台経由でログイン

Last updated at Posted at 2014-04-24

効果

sshのnetcatモードで、多段一発ログイン。

一行野郎

ssh -o 'ProxyCommand ssh hoge_pc -W %h:%p' page_pc
まぁ、netcatモードなくとも、socksでもいいし、踏台にnetcat入れてもいいんだけど。

必要な物

  • ssh (5.4以降)

追加

./ssh/config とかに設定入れとくと便利。

 Host *.jp
     ProxyCommand ssh user_ho@remote_hoge -W %h:%p

これで、
ssh user_pa@page.jp
で、remote_hoge経由でpage.jpに接続でける。

7
6
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
7
6