40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
# https://gist.github.com/grenade/6318301
|
|
#
|
|
# chmod 700 ~/.ssh
|
|
# chmod 644 ~/.ssh/authorized_keys
|
|
# chmod 644 ~/.ssh/known_hosts
|
|
# chmod 644 ~/.ssh/config
|
|
# chmod 600 ~/.ssh/id_rsa
|
|
# chmod 644 ~/.ssh/id_rsa.pub
|
|
# more secure ssh config
|
|
# https://wiki.mozilla.org/Security/Guidelines/OpenSSH
|
|
#
|
|
|
|
# Ignore SSH keys unless specified in Host subsection
|
|
# from https://news.ycombinator.com/item?id=10004678
|
|
IdentitiesOnly yes
|
|
|
|
# make known_hosts unreadable
|
|
HashKnownHosts yes
|
|
|
|
# see man ssh-config
|
|
AddKeysToAgent yes
|
|
IdentityAgent SSH_AUTH_SOCK
|
|
|
|
|
|
# order HostKeyAlgorithms
|
|
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256
|
|
|
|
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
|
|
|
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
|
|
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
|
|
|
|
|
#Host hostname_alias
|
|
# Hostname <IP or dns>
|
|
# Port 22022
|
|
# User yourusername
|
|
# IdentityFile ~/.ssh/<your_keyfile_name>.pub
|