SSH (Unix) Configuration for community.wvu.edu

To update or create your homepage on community.wvu.edu, you will need to use program that supports Secure File Transfer Protocol (SFTP) to send your files from your computer to the webserver. SFTP is a secure way to transfer files between computers. (Normal FTP transfers usernames and passwords in clear text, but SFTP encrypts this information.)

To get started:

  1. Get your Central ID
    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
  2. Acquire SSH Software and install it
  3. Launching SFTP
  4. Making the www directory
  5. Transferring 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 >

Create 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.

Transferring 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:drwxr--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 ext 1 or email oithelp@mail.wvu.edu.

 

Updated October 23, 2007