i try to run Duplicati 2 on a RaspberryPi (Raspian). Everytime i try to connect to my webserver (Ubuntu 16.04, OpenSSH 7.2) it shows an error “Failed to connect: Session operation has timed out”.
If i try to connect to the server from the RPi manually via SSH, there is no problem. If i try to connect Duplicate SFTP to my server from another machine (x86/x64), there is no problem too.
One thing you can try is running the SSH daemon in “debug mode” on the server, and see if it tells you that it connects and why it fails:
/usr/sbin/sshd -dD -p 3333
This will start the daemon in “debug mode” meaning that it listens to another port (-p 3333), only accepts one connection before shutting down (-d), and outputs debug info (-D).
Then try to connect to port 3333 from the RPI and watch the server output.
Yes, that’s the end of the log. At this point, Duplicati shows the error message.
I read your discussions, but couldn’t find a solution.
The strange part is: On every other machine, Duplicati can connect to my server and my RPi, which can’t, can connect to other servers. Just the combination of my RPi and my server results in this error.
I am not really sure why it works with overclocking enabled, so I would not know where to start debugging it.
Maybe you can try to connect with the debugging enabled, from a normal ssh client, and compare the two to see if it chooses another algorithm. You can then selectively disable the other algorithms, until you find the one that Renci.SSH is using.
It should be possible to simply disable that algorithm and then the connection will just work with another one.
There is discussion on how to configure available algorithms here:
I know this thread is 6 months old now, but I just wanted to add a shared experience here. I am running Duplicati Canary on a Raspberry Pi Model B. With the board running at stock speeds, I get a timeout on SFTP connection tests just as described here. However once I overclock the board, the timeout goes away.
I had been considering overclocking for other reasons anyway so I’m ok with this as long as it remains stable. I love that Duplicati runs on the Pi - however no idea why the overclock should be needed for SFTP connectivity tests…
Thanks for sharing your experience with this as well! Hopefully some day we’ll have enough other things resolved that we can look into why the overclocking seems necessary.
I know - the number of people using Duplicati on the old Model B is I doubt a high priority for the project! I am just trying to make good use of old hardware…
On a related note although I thought I’d got everything to work once I had performed the overclock, it the backup failed partway through with the same timeout error. So perhaps once I put load onto the SFTP connection the RPi Model B couldn’t cope even when overclocked.
I tried WebDAV but FreeNAS 11’s implementation of WebDAV didn’t work with Duplicati (though I didn’t spend long debugging and that’s off topic anyway). Currently testing plain old FTP to see if that will work.
Thanks for taking note of this - if you ever want someone to test Duplicati on esoteric old ARM hardware, I am happy to help!
Hi there ! Just tried canary and beta version as well on a Raspberry PI 3B+, same behaviour ! While it’s working for FTP service, impossible to make it work for SSH.
The exact same setup is working fine on a classic intel server, but on ARM it seems mono-SSH is not working well…
I tried to debug and I’m also stuck with these logs on my debug ssh server:
ebug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: sshd version OpenSSH_7.4, OpenSSL 1.0.2u-fips 20 Dec 2019
debug1: get user realname admin => admin
debug1: private host key #0: ssh-rsa SHA256:FDpflOXXXXXthuf1p18
debug1: private host key #1: ssh-dss SHA256:S1xwDdbXXXXX1eMcihO0
debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:s2XjKTKXXXh4MHYrEfEwio
debug1: private host key #3: ssh-ed25519 SHA256:uWwDoXXXCXAfT++llZP1vzSrQ
debug1: inetd sockets after dupping: 3, 3
Connection from 192.168.0.x port 4xx54 on 192.168.0.x port 4455
debug1: Client protocol version 2.0; client software version Renci.SshNet.SshClient.0.0.1
debug1: no match: Renci.SshNet.SshClient.0.0.1
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Enabling compatibility mode for protocol 2.0
debug1: permanently_set_uid: 1024/100 [preauth]
debug1: ssh_sandbox_child: prctl(PR_SET_SECCOMP): Invalid argument [preauth]
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256 [preauth]
debug1: kex: host key algorithm: ssh-rsa [preauth]
debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha1 compression: none [preauth]
debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha1 compression: none [preauth]
debug1: expecting SSH2_MSG_KEX_DH_GEX_REQUEST [preauth]
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received [preauth]
WARNING: could not open /etc/ssh/moduli (No such file or directory), using fixed modulus
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth]
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT [preauth]
debug1: rekey after 4294967296 blocks [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: rekey after 4294967296 blocks [preauth]
debug1: KEX done [preauth]
I am available if someone wants to understand what happens. Like it’s said before, connecting from SSH CLI is working fine and is very fast…
I think the moduli file is commonly pregenerated, so if you have another system you could try copying one.
There was also an SSH.NET bug, but if by Beta and Canary you mean current, the change should be in it. Whether or not the change was meant to solve this missing-moduli issue is unknown, but maybe it didn’t.
Hi @ts678 ! Thanks for your help. Maybe it would be a good thing to pre-generate the moduli file within Duplicati, as it’s done using the regular ssh command ? It would solve the problem if I’ve correctly understood ?
Ok I’m sorry I did not understand.
Actually, I generated the moduli file on the SFTP server and now it’s working correctly from my Raspberry Pi 3B+, so thanks for your help !!