It is possible to generate an SSH key in Linux. All you need to do is, simply run the ssh-keygen command in the command line. Once you run this command, it will ask you for a file in which the key should be saved and a passphrase i.e. password for a key. For an eg.:-

[email protected]: ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:

16:8e:e8:f2:1d:c9:b9:cf:43:9a:b3:3c:c1:1f:95:93 [email protected]

A private key will be created at /home/user/.ssh/id_rsa and a public key at /home/user/.ssh/id_rsa.pub. The passphrase is for the security of your key. If you try connecting via SSH, it will ask you to enter passphrase.