Skip to content

Instantly share code, notes, and snippets.

@MarioVilas
Last active August 28, 2023 15:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarioVilas/5da4a071f4a8be60af93617e2e7e159d to your computer and use it in GitHub Desktop.
Save MarioVilas/5da4a071f4a8be60af93617e2e7e159d to your computer and use it in GitHub Desktop.
# Needed for some old machines and iPhones.
#KexAlgorithms +diffie-hellman-group1-sha1
############################################################
# Enter any host specific configuration here.
Host example
Hostname 1.1.1.1
User myuser
PubkeyAuthentication yes
IdentityFile /home/user/.ssh/id_rsa
# DynamicForward 9090
# LocalForward 80 2.2.2.2:80
# LocalForward 443 2.2.2.2:443
# Default configuration for all hosts not above.
Host *
# Disable QoS, which gives problems with some routers.
IPQoS none
# Disable ssh-agent.
ForwardAgent no
# Default username is root.
# This prevents leaking your own username.
User root
# Disables IPv6.
AddressFamily inet
# Prevents the "too many authentication attempts" SSH bug.
#RSAAuthentication no
PubkeyAuthentication no
IdentitiesOnly yes
# Send keepalives to prevent SSH sessions for timing out.
# Also very useful for sshfs.
ServerAliveInterval 120
# Set connection sharing. Useful for sshfs.
#ControlMaster auto
#ControlPath ~/.ssh/master-%r@%h:%p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment