OpenSSH
Connecting to legacy servers
Symptom
Unable to negotiate with ADDRESS port PORT: no matching host key type found. Their offer: ssh-rsa,ssh-dss
Solution
Either specify the key algorithm via command line
-oHostKeyAlgorithms=+ssh-rsa
or add this option to ~/.ssh/config
Host ADDRESS
HostKeyAlgorithms=+ssh-rsa
Do not enable dss if possible!
Refuse client locale
For server
Comment the following line in /etc/ssh/sshd_config:
AcceptEnv LANG LC_*
For client
Comment the following line in /etc/ssh/ssh_config:
SendEnv LANG LC_*
Connection sharing
Initial configuration
mkdir ~/.ssh/sockets
chmod 700 ~/.ssh/sockets
_config_
Host HOSTNAME
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
Ending socket sharing before persist timeout
rm ~/.ssh/sockets/HOSTNAME*
Other
Generate private key
ssh-keygen -t rsa -b 4096 -C "comment"