Last active
December 16, 2015 13:39
-
-
Save t11a/5443559 to your computer and use it in GitHub Desktop.
多段SSH、ssh/config
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 step_server | |
User username | |
Hostname xx.xx.xx.xx (Step Server's IP) | |
PreferredAuthentications publickey | |
IdentityFile ~/.ssh/private.key | |
Port 22 | |
### ssh -Wオプションの場合(最近はこっちのほうがオススメらしい) | |
Host server_in_private | |
User username | |
Hostname xx.xx.xx.xx (Private IP) | |
Port 22 | |
ProxyCommand ssh -W %h:%p step_server | |
### netcatの場合 | |
Host server_in_private | |
User username | |
Hostname xx.xx.xx.xx (Private IP) | |
Port 22 | |
ProxyCommand ssh step_server nc -w 3600 %h %p (-wでtimeout時間を設定すること) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment