Click to go to the WVU homepage Search this site.
Click to submit search request.
 

UNIX Systems Group

Fri Jul 4th, 2008 @ 3:46 pm EDT
 

Links

Services
Software
Forms
Documentation
Org Chart
Mission and Goals
 

SFTP HowTo

To update or create your homepage on the central server, you will have to use SFTP to connect to the machine. The reason you have to use SFTP is, it is a secure way to transfer files between machines. Normal FTP transfers usernames and passwords in clear text. SFTP, on the other hand encrypts all traffic between machines.

The first thing you need to do is get your Central ID userid if you have not already established one. It can be setup at http://centralid.wvu.edu

There are 4 steps to getting started:

  1. Acquire SSH Software and install it
  2. Launching SFTP
  3. Making the www directory
  4. Transfering files


Acquire SSH Software and install it


This is beyond the scope of this document. However, most recent UNIX systems (including Linux) come with SSH bundled with the OS. The only component you will need for uploading your files to the server is the sftp application. If you are unsure if you have it, you can run the command find / -name "sftp". That command will show you the full path to your sftp client. You may also be able to run the command which sftp and the path to it will be displayed if it is already set in your $PATH environment variable. Be forewarned that many ssh/sftp clients for UNIX-based systems require updating at regular intervals to maintain security. It is your responsiblity to do this to maintain a secure system.

Launching SFTP

Before you connect to the server, you should be in the directory on your local host where the files you wish to upload to the server are located. (e.g. in /home/jimmy/webwork )
Once you are in that directory, to connect to the server issue the command:
sftp USERID@sftp.community.wvu.edu (where USERID is your userid in the form of aaa###). It may then ask you to accept the host key. Type yes, and then type in your password. Once you are connected you may have a prompt that says sftp >


Making the www Directory

All of your web files must be placed in a directory named www. To make this directory type the command mkdir www at the prompt. Once you have done this use the command sftp >ls -l to check to make sure the permissions on the directory look like drwxr-xr-x If they do not, you need to run the command chmod 755 www to make the directory visible to the web server and to the world.


Transfering Files

Once you have the www directory created, you can change it to it by issuing the command cd www Now you can upload your files by using the put filename.html command (where filename.html is the name of the file you want to place on the server). Make sure to check the permissions of the files by following the same steps as in the making the www directory.
The permissions should read:-rwxr--r--Run the command chmod 644 filename.html to change them.
Once you are done transfering your files, you can type the quit command to exit out of the sftp session.

If you need further assistance, please contact the OIT HelpDesk at 304-293-4444 or eMail oithelp@mail.wvu.edu.

 
1 Waterfront Place, PO Box 6504, Morgantown, WV 26506 WVU is an affirmative action/equal opportunity institution. Click to go to  the WVU homepage.