CIS Header Left CIS Header Center
C-2-100 Mackinac Hall
1 Campus Drive
Allendale, MI 49401

Phone:616-331-2060
Fax:616-331-2106
email: info@cis.gvsu.edu


ABET Accredited Symbol

The Computer Science and Information Systems programs are accredited by the Computing Accreditation Commission of ABET.
Find us on Facebook

Find us on Twitter
Networking Utilities

Index->Networking Utilities

Networking Utilities

Overview and Goals

At the completion of this lab, you will be able to...

  1. log into a different EOS machine than the one you're on
  2. transfer files to and from an EOS machine

The following utilities are used in this lab: ssh(1), sftp(1), scp(1)

Remote Login

Sometimes, the machine that you're on doesn't have a resource that your need. For example, a file might exist on another machine, or perhaps the processor on another machine is currently idle. Regardless of the need, you can log into a remote machine using the ssh(1) (secure shell) utility. ssh is a secure replacement of the more common telnet(1) utility. Like telnet, ssh allows you to log into a remote machine. However, ssh encrypts everything that passes between the two machines (your login password, commands you type, etc.). telnet is notorious for sending your password un-encrypted over the network.

To use ssh, simply type "ssh hostname" at the command-line. For example, "ssh eos20" will allow you to log into eos20. If this is your first time logging into that machine, ssh will ask you if you're really sure the machine is who they say they are. If your user id on the remote machine is different, you can type ssh -l remote_user_id hostname.

Once logged in, you can now issue commands on the other machine, just as if you were sitting down in front of it. To log out, simply type "exit" at the command-line prompt.

File Transfer

ssh has a cousin utility called sftp(1). It is a secure version of common ftp(1) utility used to transfer files between machines. Like ssh, sftp encrypts all the data that is sent between two machines, ensuring that no one can snoop your data.

You can use sftp between any two EOS machines, although you probably don't need to, given that your files are available no matter what EOS machine you're on. Between your home machine and the EOS lab, you can download an SFTP client (as well as SSH and SCP clients) from Network Simplicity (unless you're running Linux at home [good for you!]), in which case you probably already have sftp installed), point it to the EOS server cis.gvsu.edu, and transfer files back and forth.

The most common commands are:

  • bye/quit : quit sftp
  • cd path : change to a different remote directory
  • get filename : transfer a file from the remote to the local machine
  • ls : see what's in the remote directory
  • put filename : transfer a file from the local machine to the remote machine
  • binary to switch to binary transfer mode. This mode must be used when transfering binary files like (image files, compiled executables, compressed files, ZIP, MS Word documents, ...)
  • ascii to switch to ASCII/text transfer mode
These commands must be typed at the FTP prompt, not the shell prompt.

Campus Network Drive

To access your files on campus-wide network account you cannot use sftp. At this moment, our campus-wide network does not run a secure FTP server. For more detail information, visit the Internet Connectivity Link provided by the Information Technology Department.

Secure Copy

Another command you can use to copy files from remote machines is scp (Secure Copy). Similar to all secure clients, data transfered between the remote and local machines are encrypted. The syntax of the scp command is basically similar to the cp command for copying files in a local machine. Recall that the basic syntax of cp is

cp source_path destination_path
and you can specify either absolute path name (that starts with a slash '/') or relative path name (start with the name of a file or subdirectory in the current directory).

The scp program uses similar syntax with the cp command, but it takes an optional hostname before each path name. To distinguish host name from directory/file name, a colon (':') must follow the host name.

Suppose you are currently working on a local computer mypc and have access to a remote computer galaxy.

  • To copy a file Projects/Game.java from the local computer to the remote computer, add the hostname to the destination path:
    scp Projects/Game.java galaxy:
    The file Game.java will be copied to your home directory on the remote computer. The same file name will be used on the remote computer.
    scp Calculator/arith.c galaxy:~/Backup
    Assuming Backup is a (sub)directory on the remote computer, the above command will copy arith.c to the remote directory. The same file name will be used. To copy to a different name (oldarith.c):
    scp Calculator/arith.c galaxy:~/Backup/oldarith.c

  • To copy from the remote computer to the local computer:
    scp galaxy:Personal/vita.doc .
    The above command will copy a remote file vita.doc to the current directory (the same name will be used as the local copy).
If your user id on the remote computer is different from the local one, you can include it before the remote host name. Suppose your user id on a remote host galaxy is johnuser, then the above two commands must be typed as:
  • scp source_path johnuser@galaxy:destination_path
  • scp johnuser@galaxy:source_path destination_path

Exercise

  1. Using the ssh command, remote login to another computer in the EOS lab
  2. Using the scp command, copy a file from your local EOS workstation to another one. Use a different name as the target file. [Anywhere you login in the EOS lab, your home directory is actually mounted from same server (turing). When you perform a "remote" copy in this exercise, the overall effect is like copying the file locally]
  3. Read the instruction for using FTP provided by the IT department. Select "Student->FTP" from the navigation menu on the upper left corner on IT web page. Select the "Using WS_FTP (PC)" link. From this page you will find the following information:
    • FTP server hostname: ftp.novell.gvsu.edu
    • How to type your user name (.xxxxxxxx.y.student) where xxxxxxx is your userid, and y is the first letter of your userid. Notice the leading dot before your userid.
    To run the FTP program, open a shell and type "ftp" at the command prompt.
    • Using the get command at the FTP prompt, copy a file from your network drive to your EOS directory. Remember to use the binary transfer mode when transfering binary files (compiled programs, image files, ...)
    • Using the put command at the FTP prompt, copy a file from your EOS directory to your network drive
Top

This page was last modified April 16 2008.
Send comments to the CIS School Webmaster.
Copyright ©1995 - 2009 Grand Valley State University.
GVSU is an Equal Opportunity/Affirmative Action Institution.