ssh keygen copy between 2 PC where logins are different - does it make sense?
Hi
I have ssh keygen generated on one PC which looks something like that: Code:
ssh-rsa BDFdasadsdsds Then I have another second new PC2. Unfortunately I made mistake on another PC2 - when I was installing ubuntu I created another login than on first PC, let's say it is my_login2. However I will try to add second login to PC2 called my_login with root privelages. If I succeed the question is: Can I copy now keygen and known_hosts from first PC to second PC2 and will it work? The important thing is also that part after @ is different. On PC1 it is something.net and on PC2 it is somethingother.net. Despite this fact will it work? Another problem is that it is not so easy to create second account on PC2 with root privelages. I created with command: sudo usermod -aG sudo my_login and I have many issues, for example: ls /media/sf_shared ls: cannot open directory '/media/sf_shared': Permission denied |
I may be misunderstanding your question...
For example, you have: userA on PC1 userB on PC2 You can copy content of public key (file that ends in .pub) into authorized_keys file. This will allow password-less login to work between users and PCs. |
OK I thought that logins have to be the same.
I will try just when they are different and let's see if it works. Comment: It doesn't work. This login is important. I got: Code:
my_login2@something.net:~/work$ git clone -b folder ssh://gerrit.someaddress:port/somepath - install ubuntu system from the beginning now with proper login the same as on first PC and in keygen - a lot of work - generate new keygen and add it to tens of servers gitlab, gerrit - I would like to avoid this one as a lot of work - create second account on PC2 with proper login, but there are a lot of problem with lack of access for example to /media/sf_shared - any better idea? Keep in mind that I use also bitbake so any modification to this command (explicity set login) can't be done: git clone -b folder ssh://gerrit.someaddress:port/somepath as this is how bitbake use it without explicity set login. |
Just try simple SSH first:
Code:
ssh <username>@<hostname> |
If the username is different, then you will have to specify that:
Code:
git clone -b folder ssh://<username>@gerrit.someaddress:port/somepath |
AFAIK, ssh keys identify computers and users. They aren't transferable. One needs a key for each user and 'puter.
|
All times are GMT -5. The time now is 04:29 PM. |