Trouble using an ed25519 ssh key. Server closes connection.

I normally use RSA keys for SSH, but for no particular reason, I wanted to try using an ED25519 key. I made one and added it to my collection of SSH keys. I then spun an Ubuntu 17.10 droplet up and had it use this public key.

The server does not seem happy about this key, however. This is the log from when trying to connect. Any idea what’s causing this?

jes@mymachine:~$ ssh -vvv -i .ssh/testservers root@
OpenSSH_7.6p1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /home/jes/.ssh/config
debug1: Reading configuration data /usr/local/etc/ssh_config
debug2: resolving "" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file .ssh/testservers type 3
debug1: key_load_public: No such file or directory
debug1: identity file .ssh/testservers-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5p1 Ubuntu-10
debug1: match: OpenSSH_7.5p1 Ubuntu-10 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to as 'root'
debug3: hostkeys_foreach: reading file "/home/jes/.ssh/known_hosts"
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Connection closed by port 22

jes@mymachine:~$ ssh-keygen -lf .ssh/
256 SHA256:80Y1v3JofR7j6CGlACM+C4iQlMWff+qIUX5Aje+/lDw jes@mymachine (ED25519)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I managed to get around this. I suspect this has to do with the new server not being in the known_hosts file. I made a new droplet with two keys, my ‘normal’ RSA key and the ed25519 key. After logging in using the RSA key and adding the server to the known hosts, I was able to log in using the ed25519 key.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel