Last active
October 28, 2022 03:00
-
-
Save tristanmorgan/b3a25bc346a73cdfe4d76521c637fa2c to your computer and use it in GitHub Desktop.
ssh/config with proxy environment switch.
This file contains hidden or 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 * | |
StrictHostKeyChecking no | |
ServerAliveInterval 60 | |
FingerprintHash md5 | |
VisualHostKey yes | |
ControlPath /tmp/%r@%h:%p | |
IdentityFile ~/.ssh/id_rsa | |
Host github.com | |
ControlMaster auto | |
ControlPersist yes | |
Match Host github.com exec "env | fgrep -q HTTPS_PROXY" | |
User git | |
HostName ssh.github.com | |
Port 443 | |
ProxyCommand /usr/bin/nc -x 127.0.0.1:3128 -X connect %h %p | |
Host bastion 35.201.4.241 | |
HostName 35.201.4.241 | |
Port 22 | |
Host 10.0.0.* | |
ProxyJump bastion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
P.P.S. has
ProxyJump
been around for long? skips the classicProxyCommand ssh -W %h:%p -q bastion