Using Linux to FTPS, SFTP, or FTP Files Over to Your Hosting Account

Getting Started | Updated March 2026

If you're on a Linux desktop or server, you don't need a graphical FTP client to upload files to your Ultra Web Hosting account. The command line tools sftp, lftp, and ftp are built into most Linux distributions. This guide covers how to connect and transfer files using each method, with SFTP as the recommended approach.

01. SFTP (Recommended)

SFTP (SSH File Transfer Protocol) runs over SSH on port 22. It encrypts both credentials and data, handles large files reliably, and doesn't have the passive mode complications of FTP.

# Connect
sftp username@yourdomain.com

# Or connect to a specific server hostname
sftp username@web150.ultrawebhosting.com

# Navigate to your web root
sftp> cd public_html

# Upload a file
sftp> put localfile.html

# Upload a directory recursively
sftp> put -r local_directory/

# Download a file
sftp> get remotefile.html

# Download a directory recursively
sftp> get -r remote_directory/

# List files
sftp> ls -la

# Exit
sftp> exit
Tip

Use lcd (local cd) to change your local directory and lpwd (local pwd) to show your current local path. This helps when uploading files from different local directories without disconnecting.

02. LFTP for FTPS (FTP over TLS)

If SSH access isn't available on your account, FTPS (FTP with TLS encryption) is the next best option. The lftp command is the best Linux tool for FTPS:

# Install lftp if not present
sudo yum install lftp    # CentOS/RHEL
sudo apt install lftp    # Ubuntu/Debian

# Connect with explicit TLS
lftp -u username ftps://yourdomain.com

# Or with settings for self-signed certificates
lftp -e "set ssl:verify-certificate no" -u username ftps://yourdomain.com

# Once connected, common commands:
lftp> cd public_html
lftp> put localfile.html
lftp> mput *.html          # Upload multiple files
lftp> mirror -R local_dir/  # Upload entire directory (mirror reverse)
lftp> mirror remote_dir/    # Download entire directory
lftp> exit

lftp's mirror command is particularly useful for syncing directories. mirror -R uploads (reverses the mirror direction), and mirror --delete removes files on the destination that don't exist on the source.

03. Plain FTP (Not Recommended)

Plain FTP sends credentials and data in clear text. Use it only as a last resort when SFTP and FTPS aren't available:

# Connect
ftp yourdomain.com

# Enter username and password when prompted
Name: username
Password: ********

# Switch to binary mode for non-text files
ftp> binary

# Upload
ftp> put localfile.zip

# Download
ftp> get remotefile.zip

# Toggle passive mode if active mode fails
ftp> passive
Security Warning

Plain FTP transmits your username and password in clear text over the network. Anyone monitoring network traffic can capture your credentials. Always prefer SFTP or FTPS. If you must use FTP, change your password immediately afterward if you used it on an untrusted network.

04. Common File Transfer Tasks

Upload an Entire Website

# Using SFTP
sftp username@server
sftp> cd public_html
sftp> put -r mysite/*

# Using lftp (faster for many files)
lftp -u username ftps://server -e "mirror -R ./mysite/ public_html/; exit"

Download a Full Backup

# Using SFTP
sftp username@server
sftp> get -r public_html/

# Using lftp
lftp -u username ftps://server -e "mirror public_html/ ./backup/; exit"

Upload a Single Large File

# SCP is simpler for single files (uses SSH)
scp largefile.zip username@server:~/public_html/

For SCP and SSH-based file transfers, see our Linux SSH and SCP guide. For graphical FTP clients like FileZilla, see our FTP client guide.

Need SSH Access Enabled?

SFTP requires SSH access on your hosting account. If it's not currently enabled, open a support ticket and we'll turn it on for you.

Open a Support Ticket

Quick Recap: Linux File Transfers

  1. Use SFTP - sftp username@server is the most secure and reliable method
  2. Use lftp for FTPS - Best tool for TLS-encrypted FTP from Linux
  3. Avoid plain FTP - Sends credentials in clear text
  4. Use mirror for directories - lftp mirror -R syncs entire directory trees
  5. Use SCP for single files - Simpler than SFTP for quick one-off transfers

Last updated March 2026 · Browse all Getting Started articles

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Tutorials and Guides

Getting Started | Updated March 2026 Yes. You're looking at them. Our knowledgebase contains...

I tried to ssh to my new account and it said it was disabled

Article Updated This article has been consolidated SSH access details are now in our SSH...

How to Install Shopping Cart Software

Getting Started | Updated March 2026 The easiest way to add a shopping cart or e-commerce to...

What directory do I upload to?

Article Updated This article has been consolidated Upload directory information is in our...

I am getting an error - Can you help troubleshoot it?

Article Updated Need Help With an Error? Search our knowledgebase for your specific error...



Save 30% on web hosting - Use coupon code Hosting30