Telnet and FTP Tutorials For Beginners

23rd Friday Nov 2001

by M. Madan babu, I Yr PhD student with Dr. Sarah Teichmann
Structural Studies Division
MRC-Laboratory of Molecular Biology
http://www.mrc-lmb.cam.ac.uk/genomes/madanm/tftut.htm


Telnet is a protocol/program which can be used to log into a 'remote' computer and use the
programs  and data that is available on the 'remote' machine just as if it were your local
computer.

The following needs to be supplied for the program/protocol to suitably login to a remote machine
a. The name or the IP address of the computer

eg: %> telnet alf1.mrc-lmb.cam.ac.uk
eg: %> telnet 131.111.85.78

Once this is done, you can login by typing the username and password when prompted.

When you are trying to access alf1 from home. You will have to do the following

0. You have to type 'srppasswd' after you login to alf1 WHEN YOU ARE AT MRC-LMB
and set your srptelnet password
1. Download the SRPTELNET and SRPFTP program available at
http://www-cs-students.stanford.edu/~tjw/srp/binaries.html
2. Install it in your local machine.
3. type the following:
eg: %> srptelnet alf1.mrc-lmb.cam.ac.uk 24
24 is a special port which the srptelnet protocol/program uses. the default port will be used
by the standard telnet program.

FTP is an acronym for File Transfer Protocol. which means that you can use this program to
transfer your files from one machine to another.

To transfer files, you need to do the following:
1. Type ftp machinename as in  'ftp alf1.mrc-lmb.cam.ac.uk '  OR 'ftp 131.111.85.78'
2. To login to the machine, use your username and password when prompted
3. type 'bin' - this means that you are transferring files in binary mode
so that you dont have trouble between unix format and dos/mac format
4. type 'prompt off' - this command will switch 'confirmation mode' to off, which means that
the commands will be executed without the computer asking you for a confirmation.
5. type 'hash' - this command will give an indication as to how many bytes have been
transferred.

Once you have done this, the following are the commonly used commands:
You can type any command as you would do in telnet to get information about current
directory, list of files, make directory, etc

Once you are in a directory of your choice, you can do the following

1. Put files into remote machines (eg: backup copy)
eg: %> put filename

2. Get files from remote machine (eg: retrieve backup copy)
eg: %> get filename

3. Put a list of files
eg: %> mput filenam*

4. Get a list of files
eg: %> mget filenam*

To view directory settings in the current machine (the machine from which you are running ftp) just type the same unix commands, but precede the command with a '!'

eg: %> !ls
will give a list of files present in your machine
eg: %> ls
will give a list of files present in the remote machine

Whenever you want to change the local directory (directory in your present machine), type
'lcd directory'. !cd directory will NOT work.

When you are trying to FTP to alf1 from home. You will have to do the following:

0. You have to type 'srppasswd' after you login to alf1 WHEN YOU ARE AT MRC-LMB
and set your srptelnet password
1. Download the SRPTELNET and SRPFTP program available at
http://www-cs-students.stanford.edu/~tjw/srp/binaries.html
2. Install it in your local machine.
3. type the following:
eg: %> srptelnet alf1.mrc-lmb.cam.ac.uk 90
90 is a special port which the srpftp protocol/program uses. the default port will be used
by the standard ftp program.

The following are some important information about IP address in general:

1. The IP address of a computer is a unique identifier for a particular machine.
2. No two computers can have the same IP address in an Internet.
3. The IP address is specified by four numbers seperated by a '.' eg: 131.111.85.78
4. The first two numbers followed by zeros (eg: 131.111.0.0) will be the IP address of a network
(In our case, 131.111.0.0 is the IP address of Cambridge University Network).
5. The first three numbers define a subnet (in our case, all machines associated with mrc-lmb, the third number will also be a constant as in 131.111.26.0)
6. Each computer in mrc-lmb will have a unique 4th number (as in 131.111.26.28, 131.111.26.23, etc)
7. Each digit can vary from 0 to 255.
8. To eliminate the confusion of remembering numbers, we associate names with numbers.
which means
131.111 could be called as cam.ac.uk (name of the network)
131.111.26 could be called as mrc-lmb.cam.ac.uk (name of the subnet and network)
131.111.26.28 could be called as pcf41-3.mrc-lmb.cam.ac.uk (complete description of a particular machine in a specific subnet and a network)

p.s: This information is stored in a file which automatically translates the name to the number.