Setup VPS for Linux Noobs!

new password?
  • Post Last Updated: 28-Jul-12
  • Reason: corrected a link

// … keeping your web server up-to-date

Set Up the Command Line Interface (CLI) using PuTTY image

After installing your Linux OS on your unmanaged virtual private server, say, with Linode, Slicehost or others, you may be wondering, “How do I access it, securely & easily?!”

If you’re using Windows locally, here’s how, in under 5 minutes.

Not only that. Using PuTTY and OpenSSH, we’ll configure an encrypted connection that you can access using authentication keys, securely simplifying login to a double-click, password-free process.

Setup Unmanaged VPS: The Ubuntu-Nginx Guide

Take your virtual private server from zero to hero

  .. from blank box to cute-as server ..  

with this easy-to-follow copy/paste guide.

22+ parts with video, here’s the index.

The Complete VPS Security Process

So that you know where we’re going with this important foundation work, here’s the order of play:-

If you’re using a local Linux Ubuntu machine, you shouldn’t be here at all, interloper! Go to Setup openSSH for Linux-to-Linux instead and carry on from there.

Video: Setup a Simple PuTTY Configuration

Watch the, er, guvideo for a better idea of how to do this.

Please sign up for automatic premium content access.

Just $15/year* will save you hours, maybe days!

Alternatively, the vpsBible forum is free and you are welcome.

Install PuTTY, the CLI Software (it’s free!)

What is it, some kind of window sealant? Hmmn, not so far from the truth! PuTTY is an OpenSSH client or, put simply, a way of communicating securely, creating an impenetrable tunnel from your local Windows PC to your remote Linux server. It encrypts whatever you do, so passwords and the like are safe. It can also be used to speed up your local to remote logon procedure, as we’ll see later on in the series.

Goto PuTTY’s website, have a read, and then head to the download page.

There are a few PuTTY modules, but the ones we’ll be using for this setup are:-

  • PuTTY for the command line interface/terminal/shell/console/whatever else it’s called
  • Pageant the secure (SSH) authentication tool that uses a keyset to unlock a connection
  • PuTTYgen the ‘authentication keys’ generator

Hold on! What’s SSH? Aah, yes. It stands for Secure Shell. It’s a secure, encrypting network protocol, so that when you administer your VPS from your local computer, no third party can see what you’re doing. We want to use it for two things in this series:-

  • to provide a secure connection via the command line interface
  • to shore up an otherwise unencrypted FTP connection, making it SSH FTP, or Secure FTP or SFTP for short. We’ll set that up in FileZilla for Secure FTP (SFTP)

To keep everything simple, download the Windows installer which includes all required modules. As of writing, here it is.

Now, install PuTTY.

Locate Your New VPS IP Address

For example, with a Linode, but similar for Slicehost and other unmanaged VPS hosts, you’d …

  1. go to your member login page
  2. login
  3. click on your new Linode to enter the Dashboard
  4. click on Network and…
  5. in there, there’ll be a number sequenced like, and labelled, yup, IP Address. Copy that number.

How to Configure PuTTY

Set Up the Command Line Interface (CLI) using PuTTY image 2

From your Windows desktop, goto Start > All Programs > PuTTY > PuTTY, and click it open.

Where the newly opened box asks for Host Name (or IP Address), paste your IP number.

Next to it, the Port will probably say 22, which is what we want for now. Just ensure it does.

The Connection type should be set to SSH.

Click Open.

Up pops a PuTTY Security Alert. That’s standard. Click Yes.

Now at the CLI (the terminal) for the first time, as prompted, login as root and enter the password you entered when you set up your Linux distribution.

You’re in!

For the record, when you want to logout, it’s bad practise to click the close (X) button at the top right of the CLI. Enter “logout” or “exit” instead.

Jolly good, hats away!

Queued Up

As I touched on above, now we’ve got our PuTTY CLI set up, we’ll add ourselves as a Linux user, then secure the local-to-remote connection with easy shortcut access.

Then, for those of you wanting the complete Linux server solution, we’ll add some security measures before crack on with installing the big guns like PHP5, MySQL and that damn tasty Nginx web server, which knocks Apache into a cocked hat.

After a brief period of dribbling over our hot-to-trot multi-site/blog solution, we’ll consider email, secure ftp, this, that, other. Er, think I need a cold shower. You’d best just read the index…

Setup Unmanaged VPS: The Ubuntu-Nginx Guide

Take your virtual private server from zero to hero

with this easy-to-follow copy/paste guide.

“My local PC runs Windows” Show me for Linux/Mac

22+ parts with video, here’s the index ..

Manage Unmanaged VPS: Ubuntu-Nginx Administration

Already set it up? We’d best maintain it then.

Toggle to the ..  Ubuntu-Nginx Admin Index

Manage Unmanaged VPS: Ubuntu-Nginx Administration

Maintain your virtual private server with ..

.. cheatsheets, tutorials, tips & guides.

Head back to the ..  Ubuntu-Nginx Installation Index

Nginx Admin: In the Works ..

This lot’s marked for addition already:-

  • Setup or Edit DNS using Bind
  • Network Tools Troubleshooting Guide
  • The Comprehensive Permissions Guide
  • Configuring Nginx Rewrites
  • Custom Website Error Page
  • Setting up Cron Jobs
  • Rsync for Incremental Remote-to-Local Backup
  • Cron & Rsync for Automatic Backup
  • Cron & mysqldump for Auto DB Backup
  • Safeguard Bandwidth with Hotlink Protection
  • Block Access with Nginx’ IP Deny

Got a Question? Want to Comment?

This site has no comments system. We've got a better system!

Please use the link at the top of the post and goto this topic's forum thread:-

  • to help build community
  • for a superior knowledge base
  • to keep info in one place, not diluted between forum & comments.

For those posts ported from (pre-Feb/2010), archive comments remain.

Handy info from these comments is in the process of being ported to the forum and attributed to the original author.

If you think this idea sucks, let me know.

Thank you.