What is the problem you are having with rclone?
For security reasons, users of an application I am working on use an SFTP server but are not allowed SSH login and are confined to an SFTP Jail. rclone gives me the error messages shown in the log.
Run the command 'rclone version' and share the full output of the command.
C:\Users\justme>rclone version
rclone v1.65.2
- os/version: Microsoft Windows 10 Home 22H2 (64 bit)
- os/kernel: 10.0.19045.4046 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount
C:\Users\justme>
Which cloud storage system are you using? (eg Google Drive)
None. I am using my own SFTP server on Ubuntu 22.04.
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
C:\Users\justme>rclone mount fort_tu1_new_2: Z:
2024/03/06 10:45:23 NOTICE: fort_tu1_new_2: --sftp-ssh is in use - ignoring user/host/port from config - set in the parameters to --sftp-ssh (remove them from the config to silence this warning)
2024/03/06 10:46:45 Failed to create file system for "fort_tu1_new_2:": NewFs: couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF
C:\Users\justme>
Please run 'rclone config redacted' and share the full output. If you get
[fort_tu1]
type = sftp
host = 208.113.134.46
user = tu1
key_pem = C:\Users\justme\.ssh\id_ed25519_tu1.pem
ssh = ssh -i C:\Users\justme\.ssh\id_ed25519_tu1.pem tu1@208.113.134.46
known_hosts_file = C:\Users\justme\.ssh\known_hosts
shell_type = none
skip_links = true
idle_timeout = 10m0s
[fort_tu1_new]
type = sftp
host = 208.113.134.46
user = tu1
key_file = C:\Users\justme\.ssh\id_ed25519_tu1
ssh = ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46
shell_type = none
skip_links = true
idle_timeout = 10m0s
[fort_tu1_new_2]
type = sftp
host = 208.113.134.46
user = tu1
key_file = C:\Users\justme\.ssh\id_ed25519_tu1
ssh = ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46
idle_timeout = 10m0s
A log from the command that you were trying to run with the -vv
flag
C:\Users\justme>rclone mount fort_tu1_new_2: Z: -vv
2024/03/06 11:28:12 DEBUG : rclone: Version "v1.65.2" starting with parameters ["rclone" "mount" "fort_tu1_new_2:" "Z:" "-vv"]
2024/03/06 11:28:12 DEBUG : Creating backend with remote "fort_tu1_new_2:"
2024/03/06 11:28:12 DEBUG : Using config file from "C:\\Users\\justme\\Desktop\\rclone\\rclone.conf"
2024/03/06 11:28:12 NOTICE: fort_tu1_new_2: --sftp-ssh is in use - ignoring user/host/port from config - set in the parameters to --sftp-ssh (remove them from the config to silence this warning)
2024/03/06 11:28:12 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:28:12 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:28:21 DEBUG : pacer: low level retry 1/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:28:21 DEBUG : pacer: Rate limited, increasing sleep to 200ms
2024/03/06 11:28:21 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:28:21 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:28:29 DEBUG : pacer: low level retry 2/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:28:29 DEBUG : pacer: Rate limited, increasing sleep to 400ms
2024/03/06 11:28:29 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:28:29 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:28:37 DEBUG : pacer: low level retry 3/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:28:37 DEBUG : pacer: Rate limited, increasing sleep to 800ms
2024/03/06 11:28:37 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:28:37 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:28:45 DEBUG : pacer: low level retry 4/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:28:45 DEBUG : pacer: Rate limited, increasing sleep to 1.6s
2024/03/06 11:28:45 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:28:45 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:28:53 DEBUG : pacer: low level retry 5/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:28:53 DEBUG : pacer: Rate limited, increasing sleep to 2s
2024/03/06 11:28:53 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:28:53 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:29:02 DEBUG : pacer: low level retry 6/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:29:02 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:29:02 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:29:10 DEBUG : pacer: low level retry 7/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:29:10 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:29:10 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:29:18 DEBUG : pacer: low level retry 8/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:29:18 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:29:18 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:29:26 DEBUG : pacer: low level retry 9/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:29:26 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: creating additional session
2024/03/06 11:29:26 DEBUG : sftp://tu1@208.113.134.46:22/: ssh external: running: ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46 -s sftp
2024/03/06 11:29:34 DEBUG : pacer: low level retry 10/10 (error couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF)
2024/03/06 11:29:34 Failed to create file system for "fort_tu1_new_2:": NewFs: couldn't initialise SFTP: error receiving version packet from server: server unexpectedly closed connection: unexpected EOF
C:\Users\justme>
The SFTP server allows SFTP with no SSH login and users are in an SFTP Jail. This is what happens if the user tries to do an SSH login
C:\Users\justme>ssh -i C:\Users\justme\.ssh\id_ed25519_tu1 tu1@208.113.134.46
This service allows sftp connections only.
Connection to 208.113.134.46 closed.
C:\Users\justme>
It looks to me like rclone needs to do ssh login. If that is the case then rclone will not work for my application. For security reasons, users are not allowed ssh login and are confined to an SFTP Jail. Can rclone working with SFTP jailed users be made to work without SSH login? Please advise.