SSL, SSH, and encryption blurbs

ssh-keygen

Calculate the SHA256 hash of a public key

Read an ssh private key and output the public key

openssl

Creating and signing certificates

Generate self-signed certificate in one shot

You can also add -noenc (or, the older option -nodes which was short for "no DES") if you don't want to protect your private key with a passphrase. Otherwise it will prompt you for "at least a 4 character" password.

Self-signed certificate the long way

Testing things with openssl

Open a netcat-like server and client connection. Run each of these in a different terminal session. The server requires generating a key/cert pair first.

Connect via smtp to a mail server with TLS. This allows you to test a mail server certificate's validity.