File transfer
In the sections below we will explore the sftp
and scp
commands for file transfer. Going through a few examples using these commands will help you understand how you can handle files in most situations. That said, we will also cover file transfer without SFTP or SCP, in case they are disabled on the server.
SFTP
While OpenSSH is frequently used as a way to log in to remote systems, it also allows for file transfer independently of a login session. This is usually accomplished via the SFTP subsystem. Though SFTP resembles File Transfer Protocol (FTP), it is actually a completely custom protocol. Like FTP, SFTP allows authenticated users to transfer files to and from remote servers. Unlike FTP, which is insecure, SFTP’s authentication and file transfers are secure and fully encrypted.
There are many FTP clients that also support SFTP. One famous example is Filezilla, which has an excellent graphical user interface. However, since this is a book about...