Below are steps to generate SSH keys on a Linux machine: Start the key generation program by typing “ssh-keygen -m PEM -t rsa -b 4096” in terminal Enter the filename you want for the key. Enter passphrase if required. (This is optional)