sftpc is the SafeTP client for Unix. Note that a separate Windows client is available.
sftpc [ options ] server [ port ]
sftpc works similarly to the ordinary Unix FTP client, except that it can encrypt user's passwords (and, optionally, data) when conversing with a SafeTP server, such as sftpd.The server to contact must be specified on the command line. Optionally, a port may be specified; if it is not, the default of 21 is used.
When sftpc is run for the first time on a given machine by a given user, it will gather entropy and create ElGamal keys. During entropy gathering, you may be asked to type at the keyboard; please be patient with this process, as it is essential for key security.
Upon connecting to the server, sftpc will authenticate the server, then ask for your username and password. Once these have been accepted by the server, you can enter interactive commands.
- -v
- Prints the version number for sftpc.
- -zpbsz
- Specifies the size of the protection buffer. Note that a value that is either too large or too small may hurt performance; the default value has been experimentally determined to be a good size for most situations.
- -i
- Starts sftpc in passive mode. See passive command.
- -d
- Print extra debugging information.
- -a
- Print value of ADATs (Authentication DATa) exchanged during authentication. Mostly for debugging.
- -9
- Behave as a normal (RFC 959) FTP client. This effectively disables all encryption, including password encryption. This option is not recommended, unless the network connection is secured by some alternate means.
- -c
- Start with data encryption off. See prot command.
- -t
- Start with data channel in integrity-only mode. See prot command.
- -h
- Print the help message, which provides short descriptions of the command-line options.
- -X
- Accept new server keys without prompting the user.
- -Q
- Automatically use the normal (insecure) FTP protocol if the server doesn't understand the encrypted protocol.
insert-command-docs
Basic Information
sftpc must store three kinds of configuration state:
- Random seed: Necessary to generate cryptographically secure random numbers during authentication and key generation.
- ElGamal keys: Used to encrypt the conversation.
- Server keys: Used to authenticate servers after first contact.
Of these, by far the most sensitive are the ElGamal keys. In particular, if an attacker learns the ElGamal private key, he/she can decrypt both future and past sessions protected with that key.
The random seed is primarily a concern just prior to key generation; an attacker that knows the seed may be able to predict the generated key.
The server keys are only a concern if an attacker modifies them; in that case, an attacker could masquerade as a trusted server.
sftpc's Implementation
The above state, especially the ElGamal private key, must be stored on the local disk (assuming typical insecure networks such as NFS). Therefore sftpc by default stores all of this information in /tmp/user, where user is the username of the person using sftpc.
This can be inconvenient, especially on systems where /tmp is not saved across reboot. To support alternatives, sftpc will store keys in a directory specified by the SAFETP_CONFIG environment variable.
sftpd, SafeTP