Computer Research Lab

Back to Index


5. Communicating With Other Machines

5.1 Using telnet or ssh to Access a Remote Machine

Telnet and ssh are utilities that allow you to connect to a remote machine. The program ssh provides a secure connection while telnet does not. If you have an account on a different machine than you are on, you may want to log in to the remote machine and work there. When you telnet or ssh to the remote machine, you will be using that machine's resources.

To telnet to a machine, issue the command

telnet machine_name

To ssh to a machine, issue the command

ssh machine_name

where the machine name is either the name of the machine or the actual IP address of the machine. When you are connected to the remote machine, you will be asked to log in. Your session from that point runs as normal.

5.2 Using FTP to Transfer Files

FTP stands for "File Transfer Protocol" It provides the user with an interactive session allowing him or her to put files on or retrieve files from another machine.

5.2.1 Starting FTP and Connecting to the Remote Computer

FTP can be invoked with the command

ftp hostname


where hostname is the name of the host to which you wish to connect. For example, to connect to the machine eagle2.ben.edu, you would issue the command

ftp eagle2.ben.edu

FTP will then prompt you for a username and password. You should enter the username and password for the account that you have on the remote machine. If you do not have an account on the remote machine, certain systems will allow you to log in with the username anonymous and password my_address@myhost.com where the specified email address is your email address.

5.2.2 Finding Files on the Remote Computer

The following commands can be used to find files and move between directories on the remote computer.

pwd

Prints the directory on the remote machine that you are currently looking at and working with.

cd directory

Changes the current directory to the specified directory.

cdup

cd ..

Changes the current directory to the parent directory, the one "above" the current directory.

ls

Prints a listing of the current directory of the remote computer.

dir

Prints a long listing of the current directory of the remote computer. Works like ls -l at the command prompt.

 

5.2.3 Moving Around on Your Home Computer

It is easiest to start ftp from the directory that you wish to work with (i.e. the directory that contains the files you wish to transfer). However, the following commands help with movement between directories on your home machine while inside an FTP session.

lpwd

Prints the working directory on your home machine.

lcd local_directory

Changes to the specified directory on your local machine.

 

5.2.4 Getting Files From or Putting Files on the Remote Machine

Before transferring any files, it is necessary to specify the file transfer type. If the files that you will be getting are text files, set the type to A by typing ascii at the command line. If the files are binary files (i.e. executable files), set the type to I by typing bin at the command line.

The following commands will allow you to retrive files from the remote system or transfer files to the remote system.

get filename

Gets the specified file from the remote machine.

put filename

Puts the specified file into the current directory on the remote machine.

mget file_list

Gets multiple files, specified in the file list, from the remote machine. Wildcards can be used with a multiple get, i.e. mget s*.exe will get all files of type 'exe' starting with the letter 's'.

mput file_list

Puts multiple files, specified in the file list, into the working directory on the remote machine. As with mget, wildcards can be used.

 

5.2.5 Closing the FTP Connection

The commands bye, close, or quit can all be used to close your ftp connection.


Top of Document
Next Section
Table of Contents

Hardware - Network - Linux Info - Scyld/Beowulf - What is CRL - Links

Last Revised: 12 January, 2004
rmeeker@ben.edu

All rights reserved, Benedictine University ©2002-2004