How can I create multiple SSH keys?

Solution 1:

You should specify the output file, for example:

ssh-keygen -t rsa -f ~/.ssh/my-new-key

Then to connect:

ssh -i ~/.ssh/my-new-key 192.168.x.x

Or set up an SSH configuration file:

nano ~/.ssh/config

Then put in something like:

Host my-server
    HostName 192.168.x.x
    User root
    Port 22
    IdentityFile /home/username/.ssh/my-new-key

Finally:

ssh my-server