Password protect your webpages

Need help? Contact the Help Desk at 972-883-2911 or
  1. Launch an SSH client such as Putty. Putty is available for download here.

  2. Type into the Host Name field and select the SSH circle below. Click Yes at the following notice window.


  3. Enter your NetID and password when prompted.

  4. Change to the directory that you would like to password protect. To create the password text file, use the command pico filename where filename is whatever you would like to name the file.


  5. You will now find yourself in the text editor. Create a file of usernames and passwords in the format username password with each set on a seperate line.
    Note: Make sure you use unique passwords that aren’t used anywhere else.

  6. Press Ctrl-X to save changes. When prompted, press Y to confirm the changes. Type in the name that you would like to use for the file when prompted. Press Enter to proceed.


  7. Run the command htcreate filename, replacing filename with the name of the file you created. This will create two files: .htaccess and .htpasswd. .htaccess sets up the process for authentication while .htpasswd contains the usernames and encrypted passwords.


  8. For security reasons, you should remove the password file you created. Run the command rm filename where filename is whatever you named the file. Type in Yes when prompted and press Enter to confirm.

    rm filename

  9. Note: If you would like to remove password protection, simply delete the .htaccess and .htpasswd files from the directory you created them in.

Return to top.