Adding a Second SSH Key to a Remote Host

Korey Hinton –> My Blog –> Server –> Adding a Second SSH Key to a Remote Host

March 5, 2014

I always find that I run into some kind of problem whenever I try to add a new client computer to have automatic passwordless key access. So I decided to clearly document each step to adding a new client computer.

1. New Local Client

ssh-keygen

ssh-add

Copy the .pub file it saved on the new client over to the old local client.

2. Old Local Client (that has ssh access already)

scp ~/.ssh/id_rsa.pub korey@koreyhinton.com:~/.ssh/uploaded.pub

ssh korey@koreyhinton.com

3. Remote Server

# create a backup
cp ~/.ssh/authorized_keys ~/.ssh/backup

# append key
cat ~/.ssh/uploaded.pub >> ~/.ssh/authorized_keys

Now you should be able to ssh from the new local client to the remote server.

Date: 2014-11-14T13:16+0000

Author: Korey

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0