When you buy a VPS, first thing you need learn is how to connect to it. SSH is the best way to connect to a Linux VPS. It’s secure and safe. So if you’ve just bought your first VPS and trying to connect, this post will help you.
SSH stands for Secure Shell. According to Wikipedia,
Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively).
We’ll look into two methods of using SSH to connect to VPS. One method is to execute commands and the other one is to upload files.
Using PuTTY to Access VPS over SSH (Command Line Interface)
PuTTY is a free SSH client. It’s available for both Windows and Linux systems. We’ll focus on Windows version, since Linux users don’t need to use third-party software. Linux users can connect to SSH terminal by hitting CtrlAlt + T key combination.
If you’re on Windows go ahead download MSI (‘Windows Installer’) from PuTTY download page. Run the application PuTTY after installing. You’ll see a screen like below.
It’ll ask you for Hostname or IP Address. You can get it from your hosting provider. They usually send it along with other important information about your server on an email titled VPS Setup Email or New Server Information.
Type server’s IP address in the text field. And make sure port is set to 22 and connection type is set to SSH. You can optionally save server details under Saved Sessions. Then click Open.
A security warning will appear, simply click Yes. Then a window with black background will open with the text login as:. Type root and hit enter. You’ll be now asked for a password. Type the password you got from your VPS provider. You won’t see what you’re typing at this point. It’s a security feature. Just make sure you type it correctly. You’ll get used to it.
And that’s it. You’re now logged in to your server. You’ll see a welcome message from whatever OS you’re using.
Using FileZilla to Access VPS over SSH (FTP Client)
PuTTY gave us direct access to the server’s command line where we can execute Linux commands. But that’s not going to be enough for us to manage a server with websites. We occasionally need to upload and download files from the server. We must connect to VPS with a FTP client like FileZilla to transfer files.
We must install FTP server software on our VPS to access it through FTP. It’ll add some load to server and eat bit of RAM. FTP isn’t secure either. No one should use it. SSH is a better solution for this. It’s secure and you’ll hardly feel any difference.
Download and install FileZilla on your PC. Launch FileZilla after the installation. Then you can fill your server information like below.
- Host: sftp://serverIP/
- Username: root
- Password: root password
- Port: 22
Hit ‘Quickconnect’ and you’ll be connected to the server as if you were using FTP. You can do anything you would do with FTP.
So these are the two methods you can use to connect to your VPS over SSH. You can use PuTTY to execute direct commands and FileZilla to manage the file system. SSH is really handy in terms of safety and usability. It minimizes the need of a control panel.