Hello there, you beautiful people, and welcome to this video, what we're going to run through, how
you can set up a Linux instance on Digital Ocean that we can use to practice working with a remote server.
I would like to advise at this point that using digital ocean is optional and not a requirement to complete
the course.
So if you don't want to set up a digital ocean droplet for whatever reason and you have access to a
system that you can say it into already, then feel free to use that.
Or if not, then you can always take a watch and learn approach and just observe the commands that we're
using in this section.
This section isn't very long, and you'll still be able to learn all the concepts just from viewing
the videos.
In this video, you're going to learn how to set up an abundant droplet on digital ocean, which is
a cloud server hosting platform by the end of this video.
You'll be able to set up an abundant droplet on digital ocean and you'll have set up an S.H. key that
you can use to access this droplet.
And we're going to be using that in the next video.
So let's go ahead and get started.
OK, so first of all, we need to navigate to do digital ocean dotcom and then select sign up.
As you can see here, were presented with the options to create an account, either with our email address,
Google account or GitHub account.
So you can select whichever option works for you here and complete all the required information to sign
up.
Once she was signed up and logged in, you'll be presented with a page like this.
We can now click on the create button and then select droplet to create our very first droplet.
As you can see, by default, the Ubuntu operating system is already selected, which is exactly what
we want.
For the purposes of this course, we're just going to choose the most basic droplet and the lowest price.
Here were already on the basic options, so we're just going to select regular Intel with SSD here and
then select the option for five dollars a month.
OK, now we don't need any additional storage for this droplet, so we can just skip that and move on
to choosing our data center.
Now, when you're working with a cloud based server, it's always best to choose the location closest
to your geographic location.
This is because the speed of accessing the server is determined to a large extent by your distance from
the server.
The less distance your data needs to travel, the faster your connection will be.
So because I'm based in the United Kingdom, the best option for me is London, but you can select whichever
option is best for you from the list of available options.
We don't need to worry about VPC and we don't need any extra options, so we can just skip these sections.
Then we get to authentication now here, by default, the option is selected to use S.H. Keys to access
your server.
With stage, you get two options, you can either set up a stage using a password or you can set up
a stage using S.H. keys so keys are more secure.
And so what?
We're going to be selecting that option here.
And S.A.G. is an encrypted certificate that is used to authenticate your S.H. connection, a copy of
the certificate is stored on the server and another copy is stored on your system.
Speaking in rough terms here, when you attempt to make an S.H. connection to the server, the server
will compare its copy of the certificate with the copy on your system.
And if they match, then authentication is successful.
So to create our psyche, we're going to click the new SHC button here and Digital Ocean has very kindly
put all the steps required to create a key right here on the right hand side for us.
So here on the right hand side, we're told to use the command SRH Dash Kigen, which will cause our
terminal to generate a new SHC.
However, before you go ahead and create a new SHC on the computer you're working on, let's keep things
simple and first check if you already have an SHC on your system.
You can do this by running ls Tilda Slashdot says if you run this and you see a file called I'd underscore
RSA Pub like you see here, then this means you already have an.
If you do just open that file in Nano and copy and paste its contents into this box on digital ocean.
However, if you don't have any keys, then you can run the command, says Hadash kigen in your terminal
to create a new one, which I'm going to walk you through now.
When we run this command, we know prompted about where we want to store this certificate and we're
also given a default location, so let's just press enter here to keep things simple and use the default
location.
Next, we are then asked to create a passphrase for our cert.
You'll need to remember this passphrase every time you try to connect via stage using the certificate
to try to make it something secure and something memorable.
I'm going to type something in here and press enter.
And then I'm going to type it in again and present again to confirm.
Now, this process creates two files in our state's directory, in our home directory.
You say cert has a secret part and it has a public park and the public park is stored in the file ending
in a pub which stands for public.
We need to provide the public key to digital ocean, so that means we're going to be interested in the
file ending in DOT Pub.
So in my case, that's going to be I'd underscore RSA Dot pub.
You can then simply open up your public key file in Nonno and then copy and paste the contents of that
file into the key box on Digital Ocean.
I'm going to do this off camera for security purposes, but just copy the contents of the file and paste
it into that box, give the key a name of I.D., underscore RSA using this box here, and then click
the add S.H. key button.
OK, so now that we've added our assets, we already have one droplet selected, which is all we need,
and we then have the option to set the hostname that we want for our server.
I'm going to call mine Bakdash course dash server, but you can call yours whatever you like.
We then done with everything we need and we just need to click the create droplet button here and Digital
Ocean will start to deploy our droplet.
OK, so after waiting a little while, you can see that our droplet has now deployed and Digital Ocean
is providing us with the IP for the droplet that is being created.
Now, one less thing that I'd like to highlight to you is regarding pricing, although the current pricing
on digital ocean is five dollars a month for this type of droplet, the cost is billed hourly, but
the hourly cost is only zero point zero zero seven dollars per hour.
You can switch individual droplets on and off using the slider here, but be warned that this doesn't
stop billing to stop the billing, you must destroy the droplet completely.
Given that you're using this droplet only for this section of the course, you can just use the droplet
to follow along and do the exercises and then just delete the droplet from digital ocean to stop any
building and thus keep the total cost well below five dollars, assuming it takes you less than a month
to complete the videos.
To destroy a droplet, you can click on droplets on the left panel here, hover over the droplet you
want to destroy and click on more and then click destroy.
Then on the next page, you can then click destroy this droplet and then click confirm.
So as you can see, Digital Ocean provides you with a great way to quickly set up a risk free remote
Linux server environment to experiment with, and as long as you remember to completely destroy the
droplet when you're done and not simply just turn the drop it off, then it won't cost you very much
at all to play around with.
And as I say, using digital ocean is totally optional.
So we now have a very own remote cloud server all set up and ready for us to run abash scripts on,
how awesome is that?
In this video, you learn how to set up a droplet on digital ocean.
And you learn how to create an Szaky and add this into your digital ocean droplet.
In the next video, we're going to use S.H. to connect into our server and start working some magic
with bash scripts.
So for all that amazing remote stuff, I'll see you in the next video.