0

I have started using ssh keys login for my new VPS. It works on the work machine as i have placed the public key on the server using this ssh-copy-id command.

Successfully, i was able to login without password from my work machine.

Now for checking the security, i tried logging in from some other machine that didn't had the private key installed. I wasn't able to login and that was perfect.

Now i do work from home as well. I want to know the method for taking the private key from my office pc and placing it in my home pc so that i am able to login from there as well without generating a second key.

I am on ubuntu 12.0 LTS on both home and work pcs.

EDIT

Further, is it the case that once i start using ssh keys for authentication on a specific computer, i can in no way access/login to server from any other other computer until and unless i have private key? Please cast some light over the subject as i am a bit confused now :(

1 Answer 1

1

you can copy the $HOME/.ssh/id_rsa file. this contains your private key and is the only one you need to move your ssh-identity.

i really recommend to create another key, though.

Sign up to request clarification or add additional context in comments.

8 Comments

so you say that i should create separate keys for each of the pcs that i use for accessing? Please explain the reason behind the same.
@beNerd I recommend to use two keys. One at work and one at home.
@jgb I have a few confusions regarding this. First is that what if my work pc gets crashed today. Provided i am not using any other key anywhere, will there be no way of accessing my server from then on? what are the other implications.
If you use public key authentication only, you will not be able to log in or restore your private key if you lose it @beNerd
Btw: this is not the reason why I recommend to use two keys. it is more a matter of separating private and business.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.