SFTP by examples
The install base of SFTP server is massive, you can find it on almost every linux server making it the lingua franca for any file transfer related task.
What is SFTP
SFTP which stands for SSH File Transfer Protocol is a standard that defines a way by which one can access, transfer or manage some files over a network. The specificity of SFTP over other protocols is in how it leverages SSH for transport.
Beware not to confuse SFTP with FTPS or FTP which despite sounding similar are entirely different protocols that happen to share a similar use case when it comes to transfer files over a network.
Usage examples
SFTP can be use whenever you need to access / manage / transfer files. There’s so many different usage one can’t list them all but only give a few examples:
-
transfer a log file stored on a server
-
mount a remote filesystem onto your machine using another software like SSHFS
-
browse through the filesystem over a server
-
a low tech alternative to Dropbox when used with other software like Filestash:
SFTP Tooling
There’s a large ecosystem of tools from which you can use SFTP. Depending on what you’re trying to achieve, you might use:
- CLI tools:
sftp
is widely available but another great option islftp
- Libraries: all mainstram programming language have libraries to support SFTP
- Server: a lot of option from openssh, proftpd and many more
- Desktop client: cyberduck, filezilla, winscp and many more
- Web client: Filestash, MonstaFTP
Getting started with SFTP
The best way to get started with SFTP is to either:
-
use a publicly available SFTP servers like test.rebex.net or demo.wftpserver.com
-
setup your own server from any cloud provider like Hetzner, Digital Ocean, Linode, AWS EC2. Upon installation, they will provide you with a fully functional SSH and SFTP access