SCP/rsync – remote file management
Similar to telnet
, which was replaced with ssh
on many devices and systems, using insecure solutions for file transfer is being reduced. By default, the File Transfer Protocol (FTP) uses TCP port 21
, but since communication happened in plain text, it was a perfect target for intercepting credentials. FTP is still used today, mostly for serving file on servers that only allow anonymous access and wish to move to more secure options.
SSH usually enables two interfaces for copying files: scp
and sftp
. The first one is used in a similar way to the regular cp
command, but here, we're accepting remote hosts as our target or source, while sftp
uses a client approach similar to the traditional ftp
command that interacts with FTP servers. Just remember that in both cases, the connection is encrypted and happens over port 22/tcp
on the target host.
We'll dig into SCP in the next section.