Rclone SFTP remote mounting Seedbox

From Pulsed Media Wiki

Need a way to easily backup or copy files from your seedbox? This tutorial shows you how to setup rclone, so you can easily backup your seedbox when needed or copy files to another server.

Downloading rclone

Windows

Grab the newest version of rclone from rclone.org, you'll want to select "Intel/AMD - 64 Bit". Extract the .zip file using your favorite archiving program like 7Zip, WinRAR or the Windows Explorer. Navigate to the folder you just extracted and right click on an empty space while pressing shift, then click on "Open Powershell window here".

Linux

You can easily install rclone by running curl https://rclone.org/install.sh | sudo bash on your system. More info is found here.

Configuring a remote to your seedbox

Now that you have installed rclone, lets continue configuring rclone.

On Windows, run .\rclone.exe config inside the Powershell window you just opened. On Linux, run rclone config inside a terminal window.

Next, the following prompt should show up:

No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q>

Press n to create a new remote. Select a name for your remote, e.g. "seedbox" or "PulsedMediaSeedbox", in this tutorial we will use "seedbox". Next rclone will ask you to configure a type of storage. We are going to use SFTP, so enter sftp and press Enter.

Storage> sftp
** See help for sftp backend at: https://rclone.org/sftp/ **

SSH host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Connect to example.com
    \ "example.com"
host>

Now enter your seedboxes hostname, you will find it in the client area by clicking on your seedbox under "Domain" or by looking into your emails. We will use lt0-0-000example.pulsedmedia.com in this tutorial.

host> lt0-0-000example.pulsedmedia.com
SSH username, leave blank for current username, me
Enter a string value. Press Enter for the default ("").
user>

Now enter your username, this can also be found in the client area under "Username". At the SSH port section, press Enter, we are using the default SSH port.

SSH port, leave blank to use default (22)
Enter a string value. Press Enter for the default ("").
port>
SSH password, leave blank to use ssh-agent.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n>

If you are using a password, enter "y" to enter your password.

y/g/n> y
Enter the password:
password:
Confirm the password:
password:

If you are using a SSH key, press "n". Now press Enter again.

Path to PEM-encoded private key file, leave blank or set key-use-agent to use ssh-agent.

Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.

Enter a string value. Press Enter for the default ("").
key_file>

If you're using a SSH key, enter the path to it now, if you're using a password, press Enter again.

When set forces the usage of the ssh-agent.

When key-file is also set, the ".pub" file of the specified key-file is read and only the associated key is
requested from the ssh-agent. This allows to avoid `Too many authentication failures for *username*` errors
when the ssh-agent contains many keys.
Enter a boolean value (true or false). Press Enter for the default ("false").
key_use_agent>
Enable the use of insecure ciphers and key exchange methods.

This enables the use of the following insecure ciphers and key exchange methods:

- aes128-cbc
- aes192-cbc
- aes256-cbc
- 3des-cbc
- diffie-hellman-group-exchange-sha256
- diffie-hellman-group-exchange-sha1

Those algorithms are insecure and may allow plaintext data to be recovered by an attacker.
Enter a boolean value (true or false). Press Enter for the default ("false").
Choose a number from below, or type in your own value
 1 / Use default Cipher list.
   \ "false"
 2 / Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.
   \ "true"
use_insecure_cipher>
Disable the execution of SSH commands to determine if remote file hashing is available.
Leave blank or set to false to enable hashing (recommended), set to true to disable hashing.
Enter a boolean value (true or false). Press Enter for the default ("false").
disable_hashcheck>

You can press Enter again at the key_use_agent, use_insecure_cipher and disable_hashcheck prompts.

Now rclone will ask you if you want to edit the advanced config.

Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>

Enter "n", we won't need it. Your config should look similar to this:

Remote config
--------------------
[seedbox]
host = lt0-0-000example.pulsedmedia.com
user = example_user
pass = *** ENCRYPTED ***
--------------------

Press "y" to confirm.

y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>  y
Current remotes:

Name                 Type
====                 ====
seedbox              sftp

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>

Press "q" to exit rclone.

Let's check if our rclone remote to our seedbox works.

You can do that by running rclone lsd seedbox: or .\rclone.exe lsd seedbox: You should get an output looking like this:

$ rclone lsd seedbox:
          -1 2022-00-00 00:00:00        -1 .cache
          ...
          -1 2022-00-00 00:00:00        -1 .config
          ...
          -1 2022-00-00 00:00:00        -1 data
          ...
          -1 2022-00-00 00:00:00        -1 www

Good job! You can now connect to your seedbox via rclone. You can find ways to backup your seedbox with rclone online. Copying files from your seedbox with rclone is explained here.