Setting up for FTP

Next we'll go over on how to connect to a Linux Server in order to use File Transfer Protocol (FTP).

FTP will be used to upload and download files.

ℹ️ Required Applications

To connect via FTP, you’ll need an FTP client. Here are some popular options:

  1. For Windows:

    • FileZilla: A free, open-source FTP client with an intuitive interface.

    • WinSCP: An FTP and SFTP client with built-in file management.

  2. For macOS:

    • Cyberduck: A user-friendly FTP client with drag-and-drop support.

    • FileZilla: Available for macOS as well.

  3. For Linux:

    • FileZilla: Often available via Linux package managers.

    • Command Line FTP: Most Linux distributions include a built-in command-line FTP client.

  4. For Cross-Platform:

    • Visual Studio Code (with SFTP extension): Allows FTP/SFTP access from within the editor.

ℹ️ Prerequisites

Before starting, ensure you have:

  • Server IP Address or Domain Name.

  • Username and Password for FTP access.

  • Port Number (default FTP port is 21; for SFTP, it’s 22).

📘 Step-by-Step Guide to Using FTP

1

Install and Open Your FTP Client

  • FileZilla, WinSCP, Cyberduck: Download, install, and open the client.

  • Command Line (Linux): No installation needed; open your terminal.

2

Gather Server Information

Ensure you have:

  • Server Address (IP or domain).

  • FTP Username and Password.

  • Port Number (21 for FTP or 22 for SFTP).

3

Connect Using FTP

Option A: Using FileZilla

  1. Open FileZilla.

  2. In the Host field, enter the server’s IP or domain.

  3. Username and Password: Enter the FTP credentials.

  4. Port: Enter 21 for FTP or 22 for SFTP.

  5. Click Quickconnect.

  6. If prompted, accept the server’s SSL certificate.

Once connected, you’ll see the server’s file structure on the right panel and your local files on the left.

Option B: Using Command Line (Linux)

  1. Open your terminal.

  2. Enter the FTP command, replacing [server_ip] with the actual IP address:

    ftp [server_ip]
  3. Enter Username and Password: When prompted, enter your FTP username and password.

To use SFTP instead, type:

ftp [username]@[server_ip]
  1. Navigate Files:

    • Use commands like ls to list files, cd to change directories, and get to download files.

    • To upload a file, use put followed by the file name.

Option C: Using WinSCP (Windows Only)

  1. Open WinSCP.

  2. In the Host Name field, enter the server’s IP or domain.

  3. Username and Password: Enter the credentials.

  4. Port Number: Use 21 for FTP or 22 for SFTP.

  5. Click Login.

Once connected, you’ll see a file manager where you can drag and drop files between your local system and the server.

Option D: Using Cyberduck (macOS)

  1. Open Cyberduck.

  2. Click Open Connection.

  3. Choose the protocol (FTP or SFTP).

  4. Enter the server’s IP address, username, and password.

  5. Click Connect.

4

Transfer Files

  • Uploading Files: Select and drag files from your local system to the server panel.

  • Downloading Files: Select and drag files from the server panel to your local file panel.


🔧 Troubleshooting Tips

  • Connection Refused: Verify that FTP is installed and running on the server, and check that the firewall allows port 21 or 22.

  • Authentication Failed: Ensure the correct username and password, and check with the server administrator if needed.

  • Secure FTP (SFTP): If regular FTP isn’t secure enough, consider using SFTP for encrypted connections (over SSH, typically on port 22).

By following these steps, you should be able to connect to and transfer files with your server using FTP.


Next, we'll go over directly changing files inside Linux using Nano.

Last updated