Skip to content

Instantly share code, notes, and snippets.


JonTheNiceGuy/config Secret

Last active Apr 15, 2020
What would you like to do?
SSH Key Info
# All subsequent files, prefixed config.d_ should be in the config.d/ directory, so config.d_aws becomes config.d/aws
Include config.d/*
# 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'"
User git
# Only for use with really legacy gear which MUST LIVE inside your management network!
# Thanks to Stuart ( for these lines of config.
Host *
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
# 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 * my_server server
Port 12345
User someuser
# 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
User someuser
Port 12345
LocalForward 18080 proxy.example.lan:8080
DynamicForward 1080
Port 12345
Host *
User someuser
IdentityFile ~/.ssh/
Host JumpHost
User someuser
Host *
ProxyJump JumpHost
User someuser
# 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
You can’t perform that action at this time.