SSH (Secure Shell) is used for accessing other machines securely even over an unsecured network, as the communication between client and server is encrypted. It’s also used for transferring files to or from a server via the SFTP protocol, which uses SSH under the hood. SSH listens by default on port 22.