-
-
Save JonTheNiceGuy/bd18ad339d52915c56fb6b6230160ce2 to your computer and use it in GitHub Desktop.
SSH Key Info
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
# All subsequent files, prefixed config.d_ should be in the config.d/ directory, so config.d_aws becomes config.d/aws | |
Include config.d/* |
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
# Note this assumes you're working with the "YOUR-REGION" (should be something like us-east-1) | |
# Also assumes you have the aws CLI installed. | |
host i-* mi-* | |
ProxyCommand sh -c "aws ssm --region YOUR-REGION start-session --target %h --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" |
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 github.com gist.github.com gitlab.com | |
User git |
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
# Only for use with really legacy gear which MUST LIVE inside your management network! | |
# Thanks to Stuart (https://yetiops.net/) for these lines of config. | |
Host *.switch.management.lan | |
KexAlgorithms +diffie-hellman-group1-sha1 | |
Ciphers +aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc | |
# DSA auth *might* be required. If so, generate a DSA key with | |
# ssh-keygen -t id_dsa | |
# and use this setting... But if not, comment it out and use RSA or ED25519! | |
IdentityFile ~/.ssh/id_dsa |
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
# Note that you can have lots of different aliases for the same server in here, | |
# perhaps if you have a VPS with several DNS names on you might want to put them all in here. | |
# You can also put wildcards in here :) | |
Host server.example.com *.server.example.com my_server server | |
Hostname server.example.com | |
Port 12345 | |
User someuser |
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
# This provides a direct forward to your internal proxy, from it's port 8080 to your local port 18080 | |
# It also allows you to use a SOCKS proxy, using localhost:1080 | |
Host SomeProxy | |
Hostname gateway.example.org | |
User someuser | |
Port 12345 | |
LocalForward 18080 proxy.example.lan:8080 | |
DynamicForward 1080 |
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 mail.system.example.org web.system.example.org dns.system.example.org | |
Port 12345 | |
Host *.system.example.org | |
User someuser | |
IdentityFile ~/.ssh/id_ed25519.system.example.org |
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 JumpHost | |
Hostname jumphost.mycorp.example.net | |
User someuser | |
Host *.mycorp.example.net | |
ProxyJump JumpHost | |
User someuser | |
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
# Note that this turns off security on some key things, but if you're connecting to lots of cloud machines, it's useful! | |
Host * | |
StrictHostKeyChecking no | |
UserKnownHostsFile /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment