FTP

Port 21

FTP Reference

Port 21

Overview

FTP (File Transfer Protocol) is used for transferring files. It operates on port 21 and supports authenticated and anonymous access.

Commands

USER USER <username>

Specifies the username

USER anonymousUSER user
PASS PASS <password>

Specifies the password

PASS secret
PWD PWD

Prints working directory

PWD
CWD CWD <path>

Changes working directory

CWD /pubCWD ..
LCD LCD [path]

Changes local working directory

LCD /homeLCD ..
LIST LIST [path]

Lists directory contents

LISTLIST /home
RETR RETR <file>

Downloads a file

RETR readme.txt
STOR STOR <file>

Uploads a file

STOR upload.txt
QUIT QUIT

Closes the connection

QUIT
HELP HELP [command]

Shows available commands

HELPHELP RETR

Tips

  • Type help or ? for command list
  • Type help <command> for details
  • Press Ctrl+L to clear terminal

Further Reading

RFC 959 - File Transfer Protocol ↗