[PLUG] Remote host lost ssh key verification [UPDATED]

King Beowulf kingbeowulf at gmail.com
Fri Feb 24 21:54:56 UTC 2017


On 02/24/2017 01:01 PM, Rich Shepard wrote:
> On Fri, 24 Feb 2017, King Beowulf wrote:
> 
>> On DESTINATION computer: delete ~/.ssh/authorized_keys
> 
> Ed,
> 
>    That's the problem: there's no public key for this laptop in
> ~/.ssh/authorized keys!
> 
>    If I copy the laptop's /etc/ssh/ssh_host_ed25519_key.pub to a thumb drive
> and from there to the desktop's ~/.ssh/authorized_keys it is associated with
> root@<laptop_hostname>. The existing public key in authorized_keys is
> associated with rshepard@<laptop_hostname>.
> 
>    How do I transfer the laptop's ed25519_key.pub to the desktop with
> assignment to me as the authorized user?
> 
> Rich
> _______________________________________________

for ssh or scp (cp over ssh), you only need one pub key for the
connection to work.  NOT the ones in /etc/ssh.  One of the ones in ~/.ssh

take the laptop's *.pub to the desktop, and do the same for the desktop.
 pick whatever algorithm you want - I use the 4069-bit rsa.

cat laptop_key.pub > ~/.ssh/authorized_keys

That should do it as long as you know the passphrase.  You can cache the
passphrase with ssh-add if you have ssh-agent running.

My server has 2 keys in ~/.ssh/authorized_keys: one that allows local
ssh on my network, another for remote ssh from "outside" and since its
"headless" none of its pub keys exist anywhere else.





More information about the PLUG mailing list