If you're using Windows locally, here's how, in under 5 minutes.
The Complete VPS Security Process
So that you know where we're going with this important foundation work, here's the order of play:-
- In this tutorial, we’ll set up the command line interface (CLI). In the next guide Create a Linux User & Set Permissions we’ll setup a Linux user with permissions
- In Encrypt Data with OpenSSH & Auto-Login with PuTTY we can create encrypted, point-and-click access
- We’ll complete this modular process in Harden the Secure Shell (SSH) & Create a Firewall, adding a rock solid layer of security using SSH and iptables (the firewall).
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
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.
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 …
- go to your member login page
- click on your new Linode to enter the Dashboard
- click on Network and…
- in there, there'll be a number sequenced like 22.214.171.124, and labelled, yup, IP Address. Copy that number.
How to Configure PuTTY
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.
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.
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!