# Rclone fails ssh handshakes with rsync.net's SFTP when a known hosts file is specified

**URL:** <https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206>\
**Category:** Help and Support\
**Created:** [February 10, 2022, 10:51pm UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206 "2022-02-10T22:51:55Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![sweh](https://forum.rclone.org/user_avatar/forum.rclone.org/sweh/32/680_2.png) [@sweh](https://forum.rclone.org/u/sweh)\
**Post date:** [February 13, 2022, 12:31am UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206/21 "2022-02-13T00:31:20Z")

</div>

So I moved the `ed25519` entry earlier up in the list (in common.go) and recompiled (clearing the cache, ensuring the module entry wasn't refreshed!) and, as expected, it negotiated an ed25519 key.

Refreshing the module and it went back to ssh-dss.

But what I did learn was the library will allow multiple entries for a host as long as each entry has a different key type.

So:  
`ssh-keyscan -t dsa,rsa,ecdsa,ed25519 hk-s020.rsync.net >> known_hosts`

This created two entries (ssh-dss and ssh-ed25519) and this worked with the original _and_ the hacked common.go.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [February 14, 2022, 2:30pm UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206/22 "2022-02-14T14:30:41Z")

</div>

Great test, very interesting.

So do you think it is worth reporting a go issue?

Do you think we should add anything to the rclone docs?

---

<div class="post-metadata">

**Author:** ![ORYLY](https://forum.rclone.org/user_avatar/forum.rclone.org/oryly/32/15228_2.png) [@ORYLY](https://forum.rclone.org/u/ORYLY)\
**Post date:** [February 14, 2022, 11:39pm UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206/23 "2022-02-14T23:39:10Z")

</div>

> So do you think it is worth reporting a go issue?

I went ahead and already reported it to the Go tracker a day or two ago.

---

<div class="post-metadata">

**Author:** ![sweh](https://forum.rclone.org/user_avatar/forum.rclone.org/sweh/32/680_2.png) [@sweh](https://forum.rclone.org/u/sweh)\
**Post date:** [February 15, 2022, 2:34am UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206/24 "2022-02-15T02:34:57Z")

</div>

It may be worth adding the `ssh-keyscan` command to show how to generate ssh-dss keys... I'll leave that determination up to you 😉

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [February 18, 2022, 2:35am UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206/25 "2022-02-18T02:35:15Z")

</div>

Closed on February 18, 2022, 2:35am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [February 22, 2022, 9:03pm UTC](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206/26 "2022-02-22T21:03:49Z")

</div>

@sweh I stuck your command in the docs - thank you 🙂

[Previous page](https://forum.rclone.org/t/rclone-fails-ssh-handshakes-with-rsync-nets-sftp-when-a-known-hosts-file-is-specified/29206.md?page=1)
