SFTP Port Knocking

Afternoon all,

You'll have to excuse any of my terminology used, I'm relatively new to rclone but it has proved very useful.

I currently access a remote SFTP server using Davos2 in Docker, then I transfer this data to OneDrive (Sharepoint) using rclone for automated updates in Power BI. I sometimes have errors where the SFTP server has been disconnected because it utilises port knocking and I have to re-knock the ports and it then works again for quite a while.

I'm wondering whether I can use rclone to more reliably transfer data from the SFTP server directly to OneDrive (Sharepoint) but rclone doesn't appear to support port knocking...

Have I missed something... does rclone support port knocking?


What are you expecting rclone to do? Open ports on your client computer(Windows or Linux) as the port for SFTP changes mid transfer?

The ports don't change mid-transfer but I need to knock ports 65534, 65530 and 22880 to be able to connect to the client.

I have no idea what port knocking is so I'm trying to figure out what you want to happen.

  • Windows or Linux?
  • Are you expecting rclone to open and close firewall ports on that OS?
  • Can you give an example of an application that does this?

rclone does not do port knocking, do not know of any transfer tool that does.
and imho, rclone will not support that.
i had to deal with this a few years ago, found there are many simple port knocking scripts out there.

so i suggest to write a simple script.

  1. start/spawn a process to port knock every x minutes,
  2. run rclone
  3. kill that process

Thanks - I think that might be the best way to go then!

Glad I spent time trying to understand the issue and didn't get a reply.


You aren't the OP and I wasn't looking for Google as links as my expectation was the Op would explain to validate that's what they were asking as I can use Google.

Thanks but wasn't asking you.

sorry, your post was not in direct reply to anyone specific.

if you had intended myself, did not want to be rude and not reply.

1 Like

Edit - Apologies for not replying - at work trying to do multiple things at once. Not intentional.

  • Windows or Linux? - Linux (I think - it's someone else's server)
  • Are you expecting rclone to open and close firewall ports on that OS? - To attempt to open two ports and fail before attempting the final port and opening that port.
  • Can you give an example of an application that does this? - I don't know of one, sorry.

If you want to port knock you use a port knocking software prior to whatever program you want to run (rclone in this case). The same is true for ssh. There is nothing specific to rclone. On linux use knock to open the port. Then run rclone.

1 Like

Thanks. I've never seen that before so that's super neat. Appreciate the share.

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