Port 21 (FTP Control) — What It Is and How to Use It

Port 21 is the standard port for the File Transfer Protocol (FTP) control connection. It's used to establish and manage the connection between a client and server, handling commands and responses related to file transfers. While essential for traditional FTP, its unencrypted nature makes it a security risk.

Last updated: 2026-03-02

Port Number 21
Protocol FTP Control

Common Use Cases

  • Legacy file transfer systems
  • Automated backups to FTP servers
  • Web server updates via FTP

Check if Port 21 is Open

netstat -tulnp | grep :21
Get-NetTCPConnection | Where-Object {$_.LocalPort -eq 21}
⚠️ Security Note: Port 21 transmits data in plaintext, including usernames and passwords, making it vulnerable to eavesdropping and credential theft. Consider using SFTP (SSH File Transfer Protocol) or FTPS (FTP Secure) for encrypted file transfers.

Related Ports

Frequently Asked Questions

Is port 21 dangerous to leave open?

Yes, leaving port 21 open without proper security measures is dangerous. Attackers can intercept credentials and gain unauthorized access to your system, potentially leading to data breaches or malware infections. Disable it if not needed or use a secure alternative.

What service uses port 21?

The File Transfer Protocol (FTP) uses port 21 for its control connection. This connection handles commands and responses between the client and server, managing the file transfer process.