[ssh] add configuration file

This commit is contained in:
odrling 2024-03-30 02:39:35 +01:00
parent 1d1f8df9d8
commit 6f6a9dbe75
No known key found for this signature in database
GPG key ID: EC907F69A27A90C5
2 changed files with 35 additions and 0 deletions

5
.gitignore vendored
View file

@ -260,3 +260,8 @@ Cache
# swayimg
!/.config/swayimg
# ssh
!/.ssh
/.ssh/*
!/.ssh/config

30
.ssh/config Normal file
View file

@ -0,0 +1,30 @@
# ~/.ssh/config
# Only use configured identities
IdentitiesOnly yes
# Automatically add keys to ssh-agent/gpg-agent
AddKeysToAgent yes
# Ensure gpg-agent is started
Host * exec "gpg-connect-agent updatestartuptty /bye"
# Client hardening config
# https://www.ssh-audit.com/hardening_guides.html
Host *
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com
HostKeyAlgorithms sk-ssh-ed25519-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256
CASignatureAlgorithms sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256
HostbasedAcceptedAlgorithms sk-ssh-ed25519-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-256
PubkeyAcceptedAlgorithms sk-ssh-ed25519-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,ssh-ed25519,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-256
# Custom hosts configuration
Include "~/.ssh/hosts.conf"