2

When I use scp to copy some files from a server, I've lately been getting the following warning:

$ scp -rC myserver.com:~/test.log .
client_input_hostkeys: received duplicated ssh-ed25519 host key

I tried googling what this means and how to fix it but couldn't figure anything out.

This is the scp command I use for reference:

I get the error on MacOS 12 with both fish and bash shells.

I have a parallel ssh session running to the same server, could that be why I'm getting the error?

The following files are in my .ssh directory:

~/.ssh 
❯ ls 
config      id_rsa      id_rsa.pub  known_hosts
  • 1
    ever figure this out? I'm suddenly getting this same message when I rsync, although it's an ssh-rsa key not ssh-ed25519. – Michael Jun 13 '22 at 15:30

1 Answers1

0

It means you have the server configured to have 2 keys that have the same public key. This most likely means that on the server side, the server ssh config file /etc/ssh/sshd_config has 2 entries for the same type of key at the same path or with duplicate contents, eg.

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_ed25519_key
Peter
  • 2,756
  • 1
  • 20
  • 26