On 2020-03-26 20:24, Frederic Muller wrote:
On 3/26/20 7:11 PM, Ed Greshko wrote:
> On 2020-03-26 19:19, bruce wrote:
>> Hey.
>>
>> My apologies. I now I've asked this/solved this before. can't findwhere I
placed the soln.
>>
>> I have a remote VM. I've created a private/public ssh key for user
'bob' The public key is in the required location on the remote VM.
>>
>> On my normal local box,, logged in as user 'bob' I have the private key.
I can login as user bob -
>> ssh bob@remoteServer1
>> this works, no prob.
>>
>> My question
>> If I'm on user "linda"s machine, logged in as linda, what do I
need to do to be able to ssh into the remote server as user 'bob'??
>>
>> Do I place the private key of user 'bob' in the required ssh file within
user linda's ssh dir?
> Absolutely not.
>
> Private mean "private". You never take a user's private key and give
it to another user.
>
>> Which implies that I then need to remove the private key once I leave if I
don't want linda accessing the remote box later on..
>>
> If "linda" wants to "ssh bob@remoteServer1" the procedure is the
same.
>
> The user "linda" runs "ssh-keygen" to generate her own key-pair.
>
> Then you can manually append linda's public-key to bob's
~/.ssh/authorized_keys or linda runs
> "ssh-copy-id bob(a)remoteServer1". To do the ssh-copy-id she would need to
know the password
> of bob.
>
>
Yes much better advice :-)
Thank you.
Welcome.
I should have added that if you no longer want linda to access bob you just remove her
public key
from bob's authorized_keys file.
--
The key to getting good answers is to ask good questions.