简体   繁体   中英

using the ssh keys on other machine for remote login

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 :(

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM