sftp using tinyssh

Now that I've got 24/7 torrenting set up on my raspberry pi, I've come across the problem of transferring files between it and my devices.

I started solving this issue using ftp, but after doing more research, I realised that sftp suits me even better. openssh has sftp support out of the box, but since I use tinyssh I had to figure out how to set it up. After reading through tinyssh's faq, I realised that all I had to do was point tinyssh to the sftp-server binary which on arch is /lib/ssh/sftp-server.

So to set this up, all I had to do was edit the the service file using systemctl edit tinyssh@.service -l to look like this:

[Unit]
Description=TinySSH Per-Connection Daemon
Documentation=http://tinyssh.org
After=tinysshgenkeys.service

[Service]
ExecStart=/usr/bin/tinysshd -x sftp=/lib/ssh/sftp-server /etc/tinyssh/sshkeydir
KillMode=process
StandardInput=socket
StandardError=journal

And that should be it, now all you need is an sftp client and you're good.

further reading