![]() The problem that the questions seem to ask is how to make use of the same private-public key pair generated and used on a personal computer (H1) can be used on another personal machine (H2) so as not to have to set up a new private-public key and manually add it to each server that we used to connect to. One account on a server has a single username and any number of authorized public keys, all of them listed in the ~/.ssh/authorized_keys file.Īll the answers here address the issue of copying identity from one server to another server by making use of ssh-copy-id, which is not the point of the question. Public-key systems like ssh are better than the password system: People have it hammered into their head that one account on a server has a single username and, of course, a single authorized password. That can't be the right way, because everyone says that the private key is never supposed to leave the client machine. I suppose I could simply copy the private key from my laptop to my workstation.That can't be the right way, because everyone says that public key authentication is much better than passwords. I suppose I could simply log in with the same password from both places.I also want to log in to my server from my workstation ("H2").I log in to my server from my personal laptop ("H1").I assume that what you are really asking is From now on, you can log into the S1 from your H2, and also log into the S1 from your H1. This installs the public key of your workstation into the ~/.ssh/authorized_keys file for that user on the server. (but use your actual username on S1 and S1's hostname, and later type in your password on S1 when it asks for it). Copy your H2's public key to the server.Also generate the corresponding public key. If you haven't already generated a fresh private key on H2, do so now. There is never a good reason to copy a private key from some other machine.Set up H2 using the same process (but not the same private key) as you did when you set up H1:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |