Ravindra BagaleCourses & study guides

2. Ports and Protocols: SSH, HTTP, HTTPS, FTP/SFTP and DNS

2.5 FTP and SFTP

FTP juna protocol aahe – aajun kahi hosting companies vaprtat. Pan tyacha motha problem: username aani password clear text madhe jatat.

Point FTP FTPS SFTP
Port 21 (control) + 20 or random (data) 21/990 + data ports 22 (runs over SSH)
Encryption None TLS SSH
Firewall friendliness Poor (extra data ports) Poor Good (one port)
Recommended? No Only if required Yes
sftp -i mykey.pem ec2-user@<PUBLIC_IP>     # then: put file.txt, get file.txt, ls, bye
scp -i mykey.pem report.pdf ubuntu@<PUBLIC_IP>:~/

Why this matters for security

With Wireshark (Part 10) you will literally see an FTP password appear in the packet capture. Anonymous FTP login and old vulnerable FTP servers (Metasploitable 2 runs one) are classic lab targets. In real systems, replace FTP with SFTP/SCP over SSH.

Ravindra Bagale's Tip

Khup students EC2 var file upload karayla vsftpd install kartat aani port 21 open kartat. Garaj nahi! SSH already chalu aahe – WinSCP, FileZilla kiwa MobaXterm madhe protocol "SFTP" nivda, port 22, aani tumchi key dya. Ek kami port open, ek kami dhoka.

Practice task

Connect to any Linux machine with sftp, upload a file, list it, download it back, and exit with bye.