Created
April 23, 2014 14:34
-
-
Save ik11235/11217668 to your computer and use it in GitHub Desktop.
多段SSHの設定を.ssh/configにまとめる ref: http://qiita.com/ik-fib/items/12e4fab4478e360a82a1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host gateway | |
HostName sshgate.hoge | |
User hoge | |
host *-none | |
ProxyCommand none | |
Host LocalB-*-out | |
ProxyCommand ssh -W %h:%p Bgateway-out | |
Host LocalC-*-out | |
ProxyCommand ssh -W %h:%p Cgateway-out | |
Host LocalB-* | |
ProxyCommand ssh -W %h:%p Bgateway | |
Host LocalC-* | |
ProxyCommand ssh -W %h:%p Cgateway | |
Host *-out | |
ProxyCommand ssh -W %h:%p gateway | |
Host *RemoteHost* | |
HostName RemoteHost | |
User fuga | |
Host *Bgateway* | |
HostName Bgateway | |
User hogehoge | |
Host *Cgateway* | |
HostName Cgateway | |
User hogehoge | |
Host *HostA* | |
HostName HostA | |
User hogehoge | |
Host *HostB* | |
HostName HostB | |
User hogehoge | |
Host *HostC* | |
HostName HostC | |
User hogehoge | |
Host *HostD* | |
HostName HostD | |
User hogehoge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host gateway | |
HostName sshgate.hoge | |
User hoge | |
Host RemoteHost-out | |
HostName RemoteHost | |
User fuga | |
ProxyCommand ssh -W %h:%p gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host gateway | |
HostName sshgate.hoge | |
User hoge | |
Host RemoteHost* | |
HostName RemoteHost | |
User fuga | |
host *-none | |
ProxyCommand none | |
Host *-out* | |
ProxyCommand ssh -W %h:%p gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host LocalB-HostA-out HostA LocalB-HostA-out RemoteHost-out | |
Host gateway | |
… |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment