Unable to connect to SFTP server

Issue: Unable to authenticate with rclone. Able to do so with rsync.

Version: v1.53.3-DEV
Storage backend: SFTP
Command:rclone lsd sftp_remote:

Content of rclone.conf

[sftp_remote]
type = sftp
host = xxx.xxx.xxx.xxx
user = ubuntu
key_file = /home/username/.ssh/aws.key
key_use_agent=True

stdout from rclone -vv lsd sftp_remote:

DEBUG : rclone: Version "v1.53.3-DEV" starting with parameters ["rclone" "lsd" "-vv" "sftp_remote:"]
DEBUG : Using config file from "/home/username/.config/rclone/rclone.conf"
DEBUG : Creating backend with remote "sftp_remote:"
DEBUG : pacer: low level retry 1/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain)
DEBUG : pacer: Rate limited, increasing sleep to 200ms
DEBUG : pacer: low level retry 2/10 (error couldn't connect SSH: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain)
DEBUG : pacer: Rate limited, increasing sleep to 400ms

I'm sure I'm missing something super obvious, so any help would be appreciated :slight_smile:

please update to latest rclone v1.62.2 and test again.
https://rclone.org/downloads/#script-download-and-install

that should be true, tho rclone might accept True
https://rclone.org/docs/#options

I have the same issue. I'm on v1.62.2. I also don't have much experience with this. I am able to connect to the host directly through SSH so the remote host is accessible from my computer.

hello and welcome to the forum,

to best help you, please start a new topic, answer all the questions,

My issue is identical to @manthanf1's. Removing key_use_agent has helped in my case.

Mine is

[<the name>]
type = sftp
host = <the ip>
user = <the user>
port = <the port>
key_file = /home/meator/.ssh/id_rsa

I own the remote machine and I have set it up. I have generated the keys myself. It was a while since I've done that but I think I've followed SSH keys - ArchWiki

These issues are annoying. Once you figure it out, you usually never have to touch it again. It's possible that you have a different problem than I. Good luck with yours.

I've figured out how to use the agent. Details can be found here: SSH keys - ArchWiki

I ran these commands on my Linux local machine:

eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa

and then I ran the rclone commands in the same shell. Therefore I readded key_use_agent = true to my ~/.config/rclone/rclone.conf. Hope this helps.

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