Secure Shell (SSH)
Secure Shell (SSH)
Guides
OpenSSH Guidelines - Mozilla
Securing SSH - CentOS Wiki
Articles
The default OpenSSH key encryption is worse than plaintext - lvh (Latacora Blog)
How Facebook does SSH at scale - Marlon Dutra
Tools
ssh_scan “configuration and policy scanner” (Mozilla)
Secretive Generate and store SSH keys in the Mac Secure Enclave (
ecdsa-sha2-nistp256keys)
Mobile
If you use SSH on the go often you'll want to look at using Mosh
iOS
Blink Shell App Store (£17.99)
Examples
Generate Keys
The ssh-keygen utility is used to create new SSH keys on most *nix systems.
ED25519
-t: Type of key to generate-a: Number of Key Derivation Function (KDF) rounds
Remove Hashed known_hosts Entry
If your client is set to hash known hosts e.g. has the following line in ~/.ssh/config
Then your ~/.ssh/known_hosts file will be obfuscated.
To remove a host, when its hosts key changes, you'll need to execute:
Which will remove all keys associated with that hostname from ~/.ssh/known_hosts.
Configuration
Key Types
Key types are listed in the order of preference below:
ED25519>= 2048bit
RSAECDSADSAandECDSAboth fail catastrophically on bad randomness.Never use
DSAkeysAvoid
ECDSAkeys if you can
Client
Permissions
Only allow your user to access ~/.ssh and your private keys, allow group and world to access your public keys.
config
Server
Permissions
Only allow your user to access ~/.ssh and ~/.ssh/authorized_keys.
These permissions are required by the StrictModes directive.
sshd_config
Debugging sshd Issues
sshd IssuesLast updated
Was this helpful?