LoginSignup
17
18

More than 5 years have passed since last update.

~/.ssh/config に LocalForward の設定を書く

Last updated at Posted at 2012-06-20

ssh -L aaaa:proxy.domain:bbbb myname@where.is.myhost みたいにしてローカルフォワードできるが、何度もやるのが面倒。

.ssh/config ファイルに、次のように書いておけば便利:

config
Host myhost
    HostName where.is.myhost
    User myname
    LocalForward aaaa proxy.kuins.net:bbbb

こうすると、ssh myhost だけでカンタンにローカルフォワードできる。

# man すら見ずに「どうせ config で適当に書きゃまぁ行けるやろー」とか思って loc まで書いた所で neocomplecache さんが補完してくれた。neocomplecache さんパないっすね。

17
18
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
17
18