SFTP - secure file transfer over SSH

I thought I would share this recent discovery of mine - securely and interactive transfer of files using SFTP. SFTP (SSH File Transfer Protocol) allows transfer of files (e.g. to/from a pi) over SSH. This has the advantage over using a Samba share that you don’t need to be on the same network as the Pi. Also I have found samba share to be a bit of a headache on occasion, and there is the initial setup of samba is tedious. However SFTP is rock solid and very straightforward - if you can SSH to the pi then you can use SFTP. Checkout the raspberry pi docs on SFTP here. Screenshot of Filezilla below.

1 Like

scp is another (related) option, stands for secure copy. Also suns over ssh.


It is but I can’t get scp to work if I’m connecting to the ssh addon container - it only works over sftp… If you ssh to the host then scp works fine.

I tried SFTP, couldn’t get it to work. It turns out the default configuration is “sftp”: false.

But changing that to true gave me an error. Reading further, I found this:

Option ssh : username

This option allows you to change to username the use when you log in via SSH. It is only utilized for the authentication; you will be the root user after you have authenticated. Using root as the username is possible, but not recommended.

Note : Due to limitations, you will need to set this option to root in order to be able to enable the SFTP capabilities.

Here’s the documentation where I found the above:

You are confusing hassos with a real operating system. This thread is not about hassos.

Yes you need to enable compatibility mode, SFTP to true and use root as the user.