On 2020-03-23 04:19, bruce wrote:
do I have to have a local user on my local linux as "bob"..
pretty sure I don't! but I'm not sure where the local ssh key should be placed, to
allow me to ssh into the remote using the key. Also, how doe this process work when
accessing the remote from other local servers.. I'm assuming, I have to copy the
key/files to any box I want to access the remote VM from.
I use ssh-copy-id for this. And, no, you don't need a user "bob" on the
local machine.
Below the local machine is "meimei" and the remote is "frk". My user
on the local machine has run the
"ssh-keygen" command so that user has a public/priviate key-pair.
[egreshko@meimei ~]$ ssh-copy-id bob@frk
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed:
"/home/egreshko/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any
that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it
is to install the new keys
bob@frk's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'bob@frk'"
and check to make sure that only the key(s) you wanted were added.
[egreshko@meimei ~]$ ssh bob@frk
[bob@frk ~]$ ls
[bob@frk ~]$ ls -a
. .. .bash_logout .bash_profile .bashrc .mozilla .ssh
[bob@frk ~]$ ll .ssh
total 4
-rw-------. 1 bob bob 409 Mar 23 05:42 authorized_keys
[bob@frk ~]$
All done.
--
The key to getting good answers is to ask good questions.