Vultr setup – Deploy Ubuntu and Login via SSH Key [Video]

Last updated on March 9th, 2024 at 11:01 am.

Vultr setup 2024 - Deploy Ubuntu and Login via SSH Key

Watch the video above to see how to generate an SSH key, add it to Vultr, deploy a server and login using your SSH Key.

Vultr Free credit

Video summary

Setting Up SSH Key

  1. Create SSH Key on Your Computer:
    • Use ssh-keygen command to generate an Ed25519 key.
    • Optionally, add a passphrase for extra security.
  2. Add SSH Key to Vultr:
    • Go to Vultr, navigate to “Account” > “SSH Keys”.
    • Click “Add SSH Key”, give it a name (e.g., “Ed”), and paste the contents of the .pub key.

Deploying Ubuntu Server on Vultr

  1. Deploy Server:
    • Go to “Products” or “Deploy” button on Vultr.
    • Choose server type (shared CPU, dedicated CPU, GPU, etc.).
    • Select a location (e.g., Chicago).
    • Choose Ubuntu OS, preferably LTS version (e.g., Ubuntu 22.04).
    • Select the server plan (e.g., AMD High Performance 2GB RAM, 1 vCPU).
    • Configure additional options like IPv6, DDoS protection, Cloud Unit User Data, SSH keys, etc.
    • Set a server hostname.
  2. Complete Deployment:
    • Confirm settings and click “Deploy”.

Logging In via SSH

  1. SSH Login:
    • Once the server is deployed, copy the server’s IP address.
    • Open your terminal and use the SSH command to log in:css

Additional Notes

  • Always use LTS versions for production servers for long-term support.
  • Consider security options like disabling root login and setting up firewall rules.
  • Make sure to replace placeholder values (like server_ip and path_to_private_key) with your actual server details.
Vultr Free $100 credit

Video Transcript

Introduction

Welcome to this Vultr setup tutorial. In this tutorial, I’m going to show you how you can deploy an Ubuntu Server, log in to that Ubuntu Server via your SSH key. So the steps you’re going to take first of all, of course, you have to create an SSH key on your computer, and then add it to Vultr. And then we’re going to see how to deploy the server. After that, so first things first, let’s create an SSH key on our computer, and then we’re going to add that to Vultr. If you’re on Windows, first of all, let me just start there. If you’re on Windows, you can follow along with me. I’m on a Linux computer now, but you can follow along on Windows using Git Bash. Just download Git. So download and install Git from here for your Windows. Once you download it and install it, you’re going to open Git Bash. Just search for Git Bash on the Start menu, and then you can follow along with Git Bash.

Generate SSH key

So coming back, the first thing we’re going to do, I want to create my key inside of this directory, and the key will be called that. So I’m going to create this directory. I’m just going to copy and paste that in there, and the directory is now created. I want my keys to be inside of that directory.

We’re going to generate an SSH key of that type. If you don’t know the different types of SSH keys that you can generate, you can just do SSH keygen –help, and then you’re going to see a list of the different types of keys you can generate. But we’re going to generate Ed25519 key, and that is the name of the key. You can change it to whatever you want.

That is the location of where my key will be stored. If you want to change it, you can change that as well. So I’m just going to Ctrl+Shift+V to paste that in there, Enter, and you can give it a passphrase, but I’m not going to give mine a passphrase because this is just a sample that I’m doing. So I’ll press Enter, and that will generate the SSH key without a passphrase.

Add Key to Vultr

Once I do this, my keys are here. I can go inside of this directory and find them. If I just cd into this directory, cd to go into that directory, Ctrl+Shift+V, Enter. I’ll Ctrl+L to clear the screen, and then I’m going to ls, and you can see inside there we have both our keys. So this is the key that we need to add to Vultr.

The one with .pub is the one we’re going to add to Vultr. So I can just do cat Va, I’ll press Tab, and then add .pub. I just want to see the content of this, so I’m just going to copy that. I will put that on my Vultr account. So if you go to Vultr, go into Account, and then under Account, go into SSH Keys.

And while you’re here under SSH Keys, just come here to deploy, and then you can click on Add SSH key. And you can give it a name. I’ll call mine Ed. And then I will paste the SSH key there and save. So our SSH key is added.

Deploy Ubuntu server

The next step is for us to deploy our server, and then we’re going to see how we can log in with that key. So let’s come back to Products, or you can even go here under Deploy, and you can deploy a new server. I can do that here, or if you come back under the Product as well, you’ll see there’s Deploy, and you can deploy a new server. Or you can deploy a new server if you don’t have any servers listed here.

So I’m just going to click there on Deploy New Server. And then you need to choose the server type. So of course, dedicated CPU servers, these are very expensive. If that’s the one you want, that’s the one you can go for. But for us, we want to use the normal VPS servers, and these are under Shared CPU Servers. If you need Cloud GPUs, you can also get GPU servers right there. For us, Shared CPU is all we need for now. And then for the location, you can choose a location. I’m just going to choose somewhere in America. I’ll just go with Chicago. And then the next step is for me to choose an operating system. You can choose an OS here.

As I said, we’re going to go with the Ubuntu. But you can look at what options they have. If you want to install anything like CyberPanel and CPanel, you can automatically install those by just coming here under Marketplace. And there are lots of other applications you can install from the Marketplace as well.

You can also upload an ISO. You can look at the ISO library to see what is there. And if you have a backup or a snapshot, you can use those as well to create a new server. So I’m going to go back to Operating System to choose Ubuntu. And I will choose Ubuntu LTS 22.04. If you’re going to do anything in production, always use LTS because it will give you a longer time of support. And then under Plan, this is very important. You need to choose the type of server that you need.

You can choose the different servers from here. We have AMD, Intel, High Performance, High Frequency, and then Regular Cloud Compute. So you’ll see the prices for this are like $6 a month. If you want one for $5, you can click there on the Regular Compute. I want to use AMD High Performance, so that’s the one I’m going to click on. And I can choose the one with 2GB RAM, one virtual CPU.

I’m going to go with that. And then Additional Features, if you want automatic backups, this will be 20% of your current price there. So 20% of that is $2.40. And that’s what I’m getting. So I’m just going to uncheck that. I understand, disable auto backups. I’m going to uncheck that. And you can see my price has gone down to $12 as it should. And then if you want IPv6, you can enable IPv6. If you don’t want an IPv4 address, you can disable that as well. And this is usually given by default. I’m going to leave that unchecked.

You can enable DDoS protection, Virtual Private Cloud. If you want this to be inside a VPC Network, you can put it there. A VPC is basically your own network. So it can be a virtual network.

Maybe you want to put different servers in this network. You can create a VPC and add this to a certain VPC. And then you can use VPC, which is the older one, or you can use VPC Cloud 2.0, which is the newer version of VPCs on Vultr. So here you can set up a user that you can use instead of using the root user. But of course, I’m just going to leave that unchecked. You can do that later on. And then Cloud Unit User Data.

If you have any scripts that you want to run initially, maybe install certain applications, you can add those here under Cloud Init. And you’ll just enter them here. Maybe sudo apt update, sudo apt install something.

You can do that here during the initial setup of your server. And then SSH Keys. This is the first step we started with and we added a key. So I’m going to use the key that I added. And then Firewall Group.

I have not set up a firewall group, but you can set up a firewall group and then use this group to restrict access to your VPS. So Server Hostname. Make sure you give it a Server Hostname. That is, if you’re going to do… It depends on what you’re going to do with the server. But give it a Server Hostname that can be given DNS records. That way, if you’re going to use it for email, then your server can be verified using reverse DNS. But in this case, I’m just going to give it a name, “sample”. Alright, so this should pretty much cover every setting I need for my Ubuntu.

Let me just confirm. I have 2GB there. Ubuntu 22.04. Okay, the server type: Shared. Of course, that will be it for this part. And we’re just going to click on Deploy. And if you want to deploy multiple servers, you can do so as well. You’ll just click there and you’ll get multiple servers deployed. So for now, I’m just going to click on Deploy New Server. So I’m using a VPN, that is why I’m getting this verification thing. Alright, so let it continue installing.

Log in via SSH key

As you can see, it is installing. Once it has installed, we’re going to see how we can log into our server. So let’s come back here and just set up our login. I don’t want to type on the terminal, so I’m just going to do SSH setup here. And the user is going to be root because we did not change that.

We’re just going to go with root at the IP address. My IP address is there. Click to copy IP. root at this IP. And then my key, that was the name that I gave my key. So this is going to be -i for identity. -i simply means the identity of the key. And this is the key that you want to use. Copy Ctrl+V and so this is how to log into your server: SSH user IP address, then the identity of the key that you created. So we’re just going to copy that and let’s come back to the terminal and I will do Ctrl+L to clear the screen, then I will do Ctrl+Shift+V here to paste.

Depending on your terminal, the command for pasting might be different. Enter. And we’re going to accept this key. To do that, just enter yes and then Enter. There we go. We logged into our Vultr Ubuntu Server. Ctrl+L and we can confirm it’s Ubuntu by doing hostname. hostnamectl and that’s going to tell us some details about our server.

We can see icon, whatever, chassis, machine ID, virtualization, Microsoft, and then the operating system Ubuntu 22.04, and we’re using Linux 5. The Linux kernel is Linux 5. So if you want to update your server, you can do sudo apt update. Check if there are any updates. Alright, you can see 16 packages can be upgraded.

That means I can do apt upgrade to upgrade them. And that’s going to upgrade our packages. So which services should be restarted? I’m just going to press Tab to go to ok, and then I’ll press Enter so that it can automatically restart the services it recommended.

There we go. You have seen how to create an SSH key, add it to Vultr, and then deploy an Ubuntu server on Vultr. And then you’ve also seen how you can log in with your SSH key. So just make sure you follow along with the steps. If you’re lost, feel free to leave a comment in the description below. I will leave my links in the description. If you want to use Vultr, please consider supporting me. If you have any questions once again, just leave them in the comments below. I will see you next time.

Comment Here

Need WordPress help? Linux Server help? Talk to us.

  • We are your own WordPress customer service.
  • We set up Linux servers and install or migrate WordPress. Learn more here.
  • We support WooCommerce too.
  • Check out our WordPress customer support plans here or contact us below .

If you have any questions regarding WordPress support, Linux server support or any of our services, feel free to reach out or read more on our services page.

Join this free course:

How to host multiple WordPress
websites on a VPS

Close me!