ncftp
Interactive FTP client
SYNOPSIS
ncftp [options] [host]
Connects to an FTP server for interactive file transfers. For non-interactive operations, consider ncftpget and ncftpput.
PARAMETERS
-u user
Specifies the username to log in with.
-p pass
Specifies the password for authentication. Caution: Using this option exposes your password in the process list and shell history.
-P port
Specifies the port number on the remote FTP server to connect to.
-d spath
Specifies the remote starting path (directory) after logging in.
-a
Forces ASCII mode for all file transfers by default.
-v
Enables verbose output, showing more details about operations.
-r
Enables resuming partial transfers for downloads and uploads.
-o var=val
Sets an advanced option specified by var to val. Consult the ncftp man page for available variables.
-R
Forces ncftp to use a random passive port for data connections, which can be useful with certain firewalls.
-h
Displays a help message with command-line options.
-V
Displays the version information for ncftp.
DESCRIPTION
ncftp is a free, enhanced command-line FTP client program designed to be significantly more user-friendly and feature-rich than traditional ftp clients. It provides a robust interface for transferring files to and from remote servers using the File Transfer Protocol. Key enhancements include command-line completion for filenames and commands, progress meters for ongoing transfers, a bookmarking system for frequently visited sites, background transfer capabilities, automatic retries for failed connections, and passive mode enabled by default for better firewall compatibility. ncftp supports both interactive sessions, allowing users to browse and manipulate remote directories, and batch mode operations for scripting. It aims to improve efficiency and reliability, particularly over unreliable network connections, by handling various network glitches gracefully. It also supports secure FTP (FTPS) for encrypted data transfers.
CAVEATS
Using the -p option to specify a password on the command line is generally insecure as it exposes the password in the process list and shell history. It is recommended to use password prompting or ncftp's built-in ~/.ncftp/bookmarks file for storing encrypted passwords. While ncftp supports FTPS (FTP over TLS/SSL) for secure transfers, the basic FTP protocol itself is inherently insecure, transferring credentials and data in plaintext unless FTPS is explicitly used and supported by the server. The FTP protocol's use of separate control and data connections can also pose challenges with complex firewall configurations.
INTERACTIVE MODE FEATURES
In interactive mode, ncftp offers a rich set of commands and features. These include tab completion for local and remote filenames, a bookmark command to save and recall frequently visited sites, a queue command to manage pending transfers, and dynamic progress meters during file transfers. Standard commands like ls, cd, get, put, mkdir, rm, pwd, and chmod are available, often with enhanced capabilities compared to traditional FTP clients. The open command allows connecting to new hosts within the same session.
BACKGROUND TRANSFERS
ncftp allows users to initiate file transfers in the background using commands such as bgget and bgput. This means the transfer proceeds without tying up the interactive session, allowing the user to continue browsing or perform other operations. Background transfers are managed by a queue, and their status can be monitored. This is particularly useful for large files or multiple transfers.
CONFIGURATION AND BOOKMARKS
ncftp stores configuration and bookmark information in the ~/.ncftp directory. The bookmarks file (or bookmarks.db for later versions) can store site details, including hostname, username, and encrypted passwords. This allows for quick and secure connections to frequently accessed FTP servers without typing credentials repeatedly. Advanced settings can be configured via environment variables or ncftp's internal variables.
HISTORY
ncftp was originally developed by Mike Gleason in the mid-1990s as a superior alternative to the rudimentary standard ftp client shipped with Unix-like operating systems. It was designed from the ground up to address the shortcomings of ftp, focusing on user-friendliness, robustness, and advanced features such as resume support, bookmarking, and background transfers. Its development played a significant role in improving command-line FTP client usability, quickly gaining popularity among system administrators and users alike for its reliability and feature set, and has seen continuous development over the years.