To generate SSH key in GNU/Linux, use the ssh-keygen command.

Run it in the command line.

ssh-keygen -t dsa

You will be asked for a file in which the key should be saved to and for a passphrase (password) for the key.

This will create a private key written to /home/user/.ssh/id_dsa and a public key written to /home/user/.ssh/id_dsa.pub.

The passphrase is used to protect your key.

You will be asked for it when you connect via SSH.