• 追加された行はこの色です。
  • 削除された行はこの色です。
* SSH ProxyCommandで多段接続 [#h7e75d8d]

localhost から remote1を介して、remote2にアクセスしたい場合。

+ connectコマンドをRemote1にインストールする。
 wget http://www.meadowy.org/~gotoh/ssh/connect.c
 gcc connect.c -o connect
 cp connect $HOME/bin/
+ Localhostの$HOME/.ssh/configを以下のようにする。
 Host remote2
 user taro
 ProxyCommand ssh remote1 /home/taro/bin/connect %h %p
+ ssh remote2で接続できるようになる。

** 参考 [#ld8e49e4]
- http://www.meadowy.org/~gotoh/projects/connect
- http://cl.pocari.org/2006-09-04-2.html


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS