PHP and MySQL For Dummies
Book image
Explore Book Buy On Amazon

The first thing you need to do to be able to connect your web host server is to set your server up to allow SSH connections. How you log in depends on whether you are using a username/password combination or a username/key system. It also depends on which operating system you are using on your computer.

How to connect to your server with Windows

If you are using a username/password combination, connect like this:

  1. Double-click on the Putty.exe file you downloaded.

  2. Type the hostname of your server (normally your primary domain name) or its IP address into the first box.

  3. Click Open.

  4. Type your username and press Enter.

  5. Type your password and press Enter.

    image0.jpg

If you have configured your server correctly and entered the correct username and password, you should be logged in and have a command prompt with your username, your server name, and a # sign.

image1.jpg

During the login process, the server may give you warnings about not logging in if you’re not allowed to do so and might even tell you that it has notified the administrator that you’ve tried. You don’t need to worry about this unless you’re trying to break into someone else’s server!

If you are using a username/key combination, you first have to save the key in PuTTY. This is a little complicated, but it’s easy enough if you follow these steps carefully:

  1. Create a public/private key on your server and download the private part as a ppk key.

  2. Double-click on the Putty.exe file.

  3. Type the hostname of your server (usually your primary domain name) or its IP address into the first box.

  4. In the Saved Sessions box, type a name for this connection and then click Save.

    image2.jpg
  5. In the category menu at the left of PuTTY, click SSH and then Auth.

    image3.jpg
  6. Click Browse and then browse to and select the ppk file you downloaded from your server.

  7. Click Connection in the Category list and then click Data.

  8. Type your username in the Auto-login username box.

  9. Click Session and save the session again.

  10. Click Open and PuTTY opens a connection to the server and attempts to log in using the username and key you provided.

Every time you want to log in, you simply have to open PuTTY, select your saved session, and click Load. Click Open and PuTTY logs you back in.

How to connect to your server with Mac or Linux

  1. Open the Terminal program.

  2. Type ssh username@Server IP Address.

  3. Make sure to use your actual username and the IP address of your server.

  4. Terminal attempts to connect to the server and, if it is successful, prompts you for the password for the account.

You can also connect using the command username:password@Server IP Address (replace username, password, and Server IP Address with your actual details) and Terminal sends both pieces of data to the server automatically. Either way should be secure because the secure session is created before any login details are sent.

Make sure you type your password correctly because too many incorrect attempts cause your server to lock you out.

About This Article

This article can be found in the category: