next up previous
Next: Setting File Transmission Type Up: Simple FTP Client Sessions Previous: Seeing the FTP Protocol

Connecting to a server and login on

You can open a connection when you start the ftp client for example:

> ftp  ftp.cs.cf.ac.uk

This connects (essentially callingb the open command below) the named server ( ftp.cs.cf.ac.uk in this case). After this you get the same login prompt as with open below.

You must first connect (open to a server and then supply a username and password. The username can be anonymous and the password your email address for anounymous/guest FTP or your real username and password to access a server you have an account on.

The command achieve this:

open
host [ port ] -- Establish a connection to the specified host FTP server. An optional port number may be supplied, in which case, ftp will attempt to contact an FTP server at that port.

FTP will typically attempt to automatically logon the user in to the FTP server. It will request the username and password.

ftp> open ftp.cs.cf.ac.uk
Connected to thrall.cs.cf.ac.uk.
220-************************************************************************
220- Cardiff Computer Science campus ftp access. Access is available
220- here as anonymous, by ftp group or by username/password.
220-
220- The programs and data held on this system are the property of the
220- Department of Computer Science in the University of Wales, Cardiff.
220- They are lawfully available to authorised Departmental users only.
220- Access to any data or program must be authorised by the Department
220- of Computer Science.
220- 
220- It is a criminal offence to secure unauthorised access to any programs
220- or data on this computer system or to make any unauthorised
220- modification to its contents.
220- 
220- Offenders are liable to criminal prosecution.  If you are not an
220- authorised user do not log in.
220-************************************************************************
220-
220-Cardiff University.  Department of Computer Science.
220-This is the WUSL ftp daemon.  Please report problems to
220-Robert.Evans@cs.cf.ac.uk.
220-
220 thrall.cs.cf.ac.uk FTP server (Version wu-2.6.1(1) 
                  Mon Sep 18 12:45:30 BST 2000) ready.
Name (ftp.cs.cf.ac.uk:dave): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password: someone@cs.cf.ac.uk (NOTE PASSWORD TYPES BUT NOT ECHOED TO SCREEN)
230-
230-Welcome to the anonymous ftp server in the Department of Computer
230-Science in Cardiff University.
230-
230-Please note that all commands and transfers from the anonymous ftp
230-user are logged and kept in an audit file.
230-
230 Guest login ok, access restrictions apply.
ftp>

The account command may be used to logon to remote systems once connected:

account
[ passwd ] -- Supply a supplemental password required by a remote system for access to resources once a login has been successfully completed. If no argument is included, the user will be prompted for an account password in a non-echoing input mode.

The user command may be also used to logon to a remote server :

user
user-name [ password ] [ account ] -- Identify yourself to the remote FTP server. If the password is not specified and the server requires it, ftp will prompt the user for it (after disabling local echo). If an account field is not specified, and the FTP server requires it, the user will be prompted for it. If an account field is specified, an account command will be relayed to the remote server after the login sequence is completed if the remote server did not require it for logging in. Unless ftp is invoked with "auto-login" disabled, this process is done automatically on initial connection to the FTP server.

next up previous
Next: Setting File Transmission Type Up: Simple FTP Client Sessions Previous: Seeing the FTP Protocol
Dave Marshall
9/28/2001