Adding a new SSH key to your Login Node account - giobim/Some-help-from-my-Friends GitHub Wiki

To configure your Login-Node account to use your new (or existing) SSH key, you'll also need to add it to your Login-Node account.

Before adding a new SSH key to your Login-Node account, you should have:

Now, if it is your first time you are configuring your Login-Node account then you'll need to send your Public RSA Key id_rsa.pub to your Sysadmin.

If you have already installed keys and you then create a new key, one way of dealing with this is to load both the new key and old key(s) into your ssh-agent. Load the new key first, without the -c option, then load one or more old keys into the agent:

$ ssh-add
  ... prompt for pass-phrase ...
$ ssh-add -c my_old_rsa_id
  ... prompt for pass-phrase ...
$ ssh someserver

Now, if the new key is installed on the server, you'll be allowed in unprompted, whereas if you only have the old key(s) enabled, you'll be asked for confirmation, which is your cue to log back out and run

$ ssh-copy-id -i some.login.node.server

The reason you might want to specify the -i option in this case is to ensure that the comment on the installed key is the one from the .pub file, rather than just the filename that was loaded into you agent.