I was trying to figure out how to add a new SSH key to my amazon server – I found this question and answer
How do you copy the public key to a ssh-server?
However I am so new to Linux/Unix and I overthink things so I thought the following
- Since my clients access this server if I mess this up I am going to have serious problems recovering.
- How could this possibly work because I have no connection to that other server. I read the first response and it suggests that I could send my newly generated public key to any server in the land.
Does my second point make sense. The command from the shell (which I just installed) reads to me as
- ssh – use an ssh session
- copy the key to (in my case it would be ubuntu@ourspecial.server.com (hosted by Amazon though I am not sure it matters)
In other words – for a totally new user the command suggests that if I use the following command
$ ssh-copy-id tim@just.some.other.server
if there is actually a user named tim and a server named just.some.other.server
I would then have some privileges at that server
And so I finally tried the command and clearly there is something missing as when I keyed in
$ ssh-copy-id ubuntu@my.amazonserver.com
the shell returned
/usr/bin/ssh-copy-id: ERROR: No identities found
Best Answer
This command only works if you have an identity previously created via
ssh-keygen
."Common threads: OpenSSH key management, Part 1"