support/faq

SecureSSH / Password Protection

How do I use secureSSH to work with my files?

secureSSH gives you a text based interface into the server. You can use this to move or copy files. You can write and edit files and programs and perform many other functions. Your FTP username and password are required to log in. There are many secureSSH clients available on the internet, such as Putty.

Once you have your SSH client, run the client and ype the following into the dialogue box if your IP address is 123.22.33.45:

ssh 123.22.33.45

When prompted for login, type your username and then password.

Here is a short list of some of the most common Unix commands:

ls  List contents of a directory.

For each file that is a directory, ls lists the contents of the directory; for each file that is an ordinary file, ls repeats its name and any other information requested. The output is sorted alphabetically by default. When no argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments appear before directories and their contents.

Usage:

ls -l -lists files in long format,

This gives such information as file permissions, size, owner, group and other info

ls -a -lists hidden files along with other files

cd    Change working directory.

The cd utility will change the working directory of the current shell execution environment. When invoked with no operands, and the HOME environment variable is set to a non-empty value, the directory named in the HOME environment variable will become the new working directory.

Usage:

cd [dir] -changes current working directory to dir

cd -changes current working directory to your home directory

vi

Vi is a unix text editor that is excellent for making changes to files on line. It is invoked by typing vi [file name] from the command prompt. You can write and save your changes right on line without uploading and downloading your files.

The Unix environment is a rich one to perform many tasks on line. Our servers are packed with most programs you will need to perform a multitude of tasks. A short review of Unix commands available at many locations on the net will allow you to harness this power for your site. Also typing "help" at any command prompt will bring up a help menu.

How do I use htaccess to password protect files and directories?

To utilize htaccess dynamic password protection on a directory:

1) Create a passwd file. You can create a passwd file with the "htpasswd" utility on the server.

To create a new password file telnet into your account and type: htpasswd -c [filename] [user]

For example:

htpasswd -c .htpasswd hingis

You will then be prompted to enter a password for the user.

To add a new user to an existing password file, run the command:

htpasswd [passwd file] [user]

For example:

htpasswd .htpasswd john

Again you will be prompted for a password for "john".

2) Create an .htaccess file. The .htaccess file affects the directory in which it is placed, so that anyone requesting a file in the directory in which the .htaccess file resides would be presented with an authentication request.

For instance, if the .htaccess file were located at

, then anyone requesting

would be presented with an authentication request.The .htaccess file also affects directories recursively below it. Therefore, if someone were to request a file requesting would yield the same authentication request unless ~/somepath/evenmore had an .htaccess file of its own. So you need to place the .htaccess file in the directory that you wish to password protect. You can either create this file locally and ftp the file to the server, or you can edit the file directly on the server using the text editor vi:

vi .htaccess

A standard .htaccess file contains the following:

AuthUserFile

AuthGroupFile /dev/nullAuthName

AuthType Basic

require valid-user

For example, if you want to protect a directory "members" in your root directory, place the following .htaccess file in the members directory. Be sure to include the full path including your home directory for the AuthUserFile.

This assumes your document directory is located in /home//, and your passwd file is named ".htpasswd" and is located in the /cgi-bin/ directory.

AuthUserFile /home//cgi-bin/.htpasswd

AuthGroupFile /dev/null

AuthName This Area is Restricted to Members Only.

AuthType Basic

require valid-user

For more information on .htaccess files visit:

http://help.netscape.com/kb/server/960513-104.html

http://consult.ncsa.uiuc.edu/docs/httpd/Config/access/

 

Register Your Domain Today!

Check Availability

 

     More Info

 

Partner With Us

 

Request More Information

 

Sign up for our newsletter