Advanced Topic 36 of 50 Computer Networks
FTP and SSH
File transfer and secure remote login protocols.
How it works
FTP, the File Transfer Protocol, transfers files using a control connection on port 21 and separate data connections, in active or passive mode, and sends credentials in plain text. SSH, Secure Shell, provides encrypted remote login, command execution and tunnelling over port 22, authenticating with passwords or public-key pairs; SFTP and SCP transfer files over it. Host keys protect against impersonation.
Step-by-step walkthrough
- FTP opens a control connection on port 21.
- It transfers files over a second data connection.
- FTP sends passwords in plain text, so it is unsafe.
- SSH encrypts everything with keys.
- SFTP and scp move files securely over SSH.
Where it is used
SSH is the standard for administering servers, running Git over SSH, automation and port forwarding. FTP survives in legacy systems and some hosting.
Common pitfall
Plain FTP exposes passwords and data, and firewalls and NAT complicate its dual connections, so prefer SFTP. SSH risks include weak passwords, leaked private keys and ignoring host-key warnings. Disable password logins, use keys with passphrases, restrict users and keep servers patched. Verify host fingerprints on first connection.
Where it fits in the course
FTP and SSH is topic 36 of 50 in Computer Networks, rated Advanced. It follows Email Protocols. The next topic is CDN.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Computer Networks quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is FTP and SSH?
Where do people use FTP and SSH?
What is the most common mistake with FTP and SSH?
What should I learn before this topic?
How can I practice it?
Is FTP and SSH hard to learn?
How long does it take to learn FTP and SSH?
Which topics are related to FTP and SSH?
What should I study after FTP and SSH?
Related topics
- Email Protocols (Computer Networks)
- CDN (Computer Networks)
- HTTPS and TLS (Computer Networks)
- Load Balancers (Computer Networks)