Secure Shell (SSH)

Secure Shell (SSH)

Guides

Articles

Tools

  • ssh_scan “configuration and policy scanner” (Mozilla)

  • Secretive Generate and store SSH keys in the Mac Secure Enclave (ecdsa-sha2-nistp256 keys)

Mobile

If you use SSH on the go often you'll want to look at using Mosh

iOS

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:

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

Last updated

Was this helpful?