You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 1, 2021. It is now read-only.
Copy file name to clipboardexpand all lines: 00-AWS-Free-Tier.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,24 @@
1
1
# Day 0 - Creating Your Own Server - with AWS Free Tier
2
2
3
3
## INTRO
4
+
4
5
First, you need a server. You can't really learn about administering a remote Linux server without having one of your own - so today we're going get one - completely free!
5
6
6
7
Through the magic of Linux and virtualization, it's now possible to get a small Internet server setup almost instantly - and at very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a datacentre somewhere, a single physical server running Linux will be split into a dozen or more Virtual servers, using the KVM (Kernel-based Virtual Machine) feature that's been part of Linux since early 2007.
7
8
8
-
In addition to a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
9
-
10
-
These instructions will walk you through using Amazon's AWS "Free Tier" (http://aws.amazon.com) as your VPS hosting provider. They are rated highly, with a very simple and slick interface. Although we'll be using the Free Tier, be warned that you will need to provide valid credit card information. (Of course, if you have a strong reason to use another provider, then by all means do so, but be sure to choose Ubuntu Server 20.04)
9
+
In addition to a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
10
+
11
+
These instructions will walk you through using Amazon's AWS "Free Tier" (<http://aws.amazon.com>) as your VPS hosting provider. They are rated highly, with a very simple and slick interface. Although we'll be using the Free Tier, be warned that you will need to provide valid credit card information. (Of course, if you have a strong reason to use another provider, then by all means do so, but be sure to choose Ubuntu Server 20.04)
11
12
12
13
## Signing up with AWS
13
-
Signup is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA - a second method of authentication.
14
+
15
+
Sign-up is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA - a second method of authentication.
14
16
You will need to also provide your VISA or other credit card information.
17
+
15
18
* For Support Plan, choose "Basic Plan/Free"
16
19
17
20
Logout, then login again, and then select:
21
+
18
22
* Services - from the top menu
19
23
* EC2 - from the list of services
20
24
@@ -36,9 +40,9 @@ Your server instance should now launch, and you can login to it by:
36
40
37
41
## Remote access via SSH
38
42
39
-
You should see an "IPv4" entry for your server, this is its unique Internet IP address, and is how you'll connect to it via SSH (the Secure Shell protocol) - something we'll be covering in the first lesson.
43
+
You should see an "IPv4" entry for your server, this is its unique Internet IP address, and is how you'll connect to it via SSH (the Secure Shell protocol) - something we'll be covering in the first lesson.
40
44
41
-
This video, "How to Set Up AWS EC2 and Connect to Linux Instance with PuTTY" (https://www.youtube.com/watch?v=kARWT4ETcCs), gives a good overview of the process.
45
+
This video, "How to Set Up AWS EC2 and Connect to Linux Instance with PuTTY" (<https://www.youtube.com/watch?v=kARWT4ETcCs>), gives a good overview of the process.
42
46
43
47
You will be logging in as the user *ubuntu*. It has been added to the 'adm' and 'sudo' groups, which on an Ubuntu system gives it access to read various logs - and to "become root" as required via the _sudo_ command.
44
48
@@ -61,6 +65,7 @@ To logout, type _logout_ or _exit_.
61
65
Your server is now all set up and ready for the course!
62
66
63
67
Note that:
68
+
64
69
* This server is now running, and completely exposed to the whole of the Internet
65
70
* You alone are responsible for managing it
66
71
* You have just installed the latest updates, so it should be secure for now
Copy file name to clipboardexpand all lines: 00-Azure-Free-Tier.md
+12-9
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,37 @@
1
1
# Day 0 - Creating Your Own Server - with Azure Free Credits
2
2
3
3
## INTRO
4
-
First, you need a server. You can't really learn about administering a remote Linux server without having a one of your own - so today we're going get one - completly free!
4
+
5
+
First, you need a server. You can't really learn about administering a remote Linux server without having a one of your own - so today we're going get one - completely free!
5
6
6
7
Through the magic of Linux and virtualisation, it's now possible to get a small Internet server setup almost instantly - and at very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a datacentre somewhere a single physical server running Linux will be split into a dozen or more Virtual servers using the KVM (Kernel-based Virtual Machine) feature that's been part of Linux since early 2007.
7
8
8
-
As well as a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
9
-
10
-
These instructions will walk you through using Azure's free credits
9
+
As well as a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
10
+
11
+
These instructions will walk you through using Azure's free credits.
11
12
12
13
## Signing up with Azure
13
-
Signup is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA - a second method of authentication. Azure can be a bit funny about 'corporate' email addresses, eg using a work address or your own domain. Create a new @outlook or @gmail.com account if so using the link on the signup page.
14
+
15
+
Sign-up is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA - a second method of authentication. Azure can be a bit funny about 'corporate' email addresses, eg using a work address or your own domain. Create a new @outlook or @gmail.com account if so using the link on the sign-up page.
14
16
You will need to also provide your VISA or other credit card information.
15
17
16
18
- Click 'start building in azure'
17
19
- Click 'Deploy a virtual machine'
18
20
- Click 'Create a linux virtual machine'
19
21
- Search and select Ubuntu Server 20.04 LTS
20
22
- Use the Standard _D2s_v3 size - this should be comfortably covered by your trial credits for the duration of the course
21
-
- Ensure 'SSH Public Key' for authentication and 'generate new key pair' for SSH Public Key source are selected
23
+
- Ensure 'SSH Public Key' for authentication and 'generate new key pair' for SSH Public Key source are selected
22
24
- Leave 'allow selected ports' as 'ssh (22)' for now
23
25
- Click 'Review + Create'
24
26
- Azure will generate and download the private key file to SSH onto the box -
25
27
- (Windows) double-click this to open on Windows and it will be added to your cert store on the machine
26
28
- (Mac OS X and Linux) run the command 'sudo ssh-add -K /link-to-downloaded-file'
27
-
- Connect to the machine using 'ssh azureuser@PUBLICIP'
29
+
- Connect to the machine using `ssh azureuser@PUBLICIP`
28
30
29
31
Now to fully expose the machine and all ports to the internet:
30
32
31
-
- Navigate to https://portal.azure.com/#home
32
-
- Select 'Virtual Machines'
33
+
- Navigate to <https://portal.azure.com/#home>
34
+
- Select 'Virtual Machines'
33
35
- Select your created virtual machine and select 'Networking' from the settings pane
34
36
- Click 'Inbound Port Rules' and 'Add inbound port rule'
35
37
- Set 'source port ranges' and 'destination port ranges' to '*' and set 'Source' and 'Destination' to 'any'. Ensure protocol is set to 'any' and action is set to 'allow'. Set the priority to '100' and create an appropriate name
@@ -63,6 +65,7 @@ To logout, type _logout_ or _exit_.
63
65
Your server is now all set up and ready for the course!
64
66
65
67
Note that:
68
+
66
69
* This server is now running, and completely exposed to the whole of the Internet
67
70
* You alone are responsible for managing it
68
71
* You have just installed the latest updates, so it should be secure for now
Copy file name to clipboardexpand all lines: 00-Digital-Ocean.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ First, you need a server. You can't really learn about administering a remote Li
6
6
7
7
Through the magic of Linux and virtualization, it's now possible to get a small Internet server setup almost instantly - and at very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a datacentre somewhere, a single physical server running Linux will be split into a dozen or more Virtual servers, using the KVM (Kernel-based Virtual Machine) feature that's been part of Linux since early 2007.
8
8
9
-
In addition to a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
10
-
11
-
These instructions will walk you through using Digital Ocean (http://digitalocean.com) as your VPS hosting provider. They are rated highly, with a very simple and slick interface - and low cost of $5 (USD) per month for the minimal server that you'll be creating. (Of course, if you have a strong reason to use another provider, then by all means do so, but be sure to choose Ubuntu Server 20.04)
9
+
In addition to a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
10
+
11
+
These instructions will walk you through using Digital Ocean (<http://digitalocean.com>) as your VPS hosting provider. They are rated highly, with a very simple and slick interface - and low cost of $5 (USD) per month for the minimal server that you'll be creating. (Of course, if you have a strong reason to use another provider, then by all means do so, but be sure to choose Ubuntu Server 20.04)
12
12
13
13
## Signing up with Digital Ocean
14
14
15
-
Signup is immediate - just provide your email address and a password of your choosing and you're in!
15
+
Sign-up is immediate - just provide your email address and a password of your choosing and you're in!
16
16
17
17
* Choose "Manage, Droplets" from the left-hand sidebar. (a "droplet" is Digital Ocean's cute name for a server!)
18
18
* Select the image "Ubuntu 20.04 LTS"
@@ -27,7 +27,7 @@ Signup is immediate - just provide your email address and a password of your cho
27
27
28
28
## Logging in for the first time
29
29
30
-
Select your droplet and "Access" from the left-hand sidebar and you should be able to login to the console using this. Use the login name "root", and the password you selected. Note that the password won't show as you type or paste it.
30
+
Select your droplet and "Access" from the left-hand sidebar and you should be able to login to the console using this. Use the login name "root", and the password you selected. Note that the password won't show as you type or paste it.
31
31
32
32
## Creating a working admin account
33
33
@@ -39,7 +39,7 @@ We want to follow the Best Practice of not logging as "root" remotely, so we'll
39
39
40
40
`usermod -a -G sudo snori74`
41
41
42
-
(Of course, replace 'snori74' with your name!)
42
+
(Of course, replace 'snori74' with your name!)
43
43
44
44
*This* will be the account that you use to login and work with your server. It has been added to the 'adm' and 'sudo' groups, which on an Ubuntu system gives it access to read various logs and to "become root" as required via the _sudo_ command.
45
45
@@ -62,19 +62,19 @@ Don't worry too much about the output and messages from these commands, but it s
62
62
With our new working user able to perform all sysadmin tasks, there is no reason for us to login user *root*. Our server is exposed to all the internet, and we can expect continuous attempts to login from malicious bots - most of which will be attempting to login as *root*. While we did set a very secure password just before, it would be nice to know that remote login as *root* is actually *impossible* - and it's possible to do that with this command:
63
63
64
64
`sudo usermod -p "!" root`
65
-
66
-
This disables direct login access, while still allowing approved logged in users to "become root' as necessary - and is the normal default configuration of an Ubuntu system. (Digital Ocean's choice to enable "root" in their image is non-standard).
67
65
66
+
This disables direct login access, while still allowing approved logged in users to "become root' as necessary - and is the normal default configuration of an Ubuntu system. (Digital Ocean's choice to enable "root" in their image is non-standard).
68
67
69
68
To logout, type _logout_ or _exit_.
70
69
71
70
Your server is now all set up and ready for the course!
72
71
73
72
## Remote access via SSH
74
73
75
-
You should see an "IPv4" entry for your server, this is its unique Internet IP address, and is how you'll connect to it via SSH (the Secure Shell protocol) - something we'll be covering in the first lesson.
74
+
You should see an "IPv4" entry for your server, this is its unique Internet IP address, and is how you'll connect to it via SSH (the Secure Shell protocol) - something we'll be covering in the first lesson.
76
75
77
76
Note that:
77
+
78
78
* This server is now running, and completely exposed to the whole of the Internet
79
79
* You alone are responsible for managing it
80
80
* You have just installed the latest updates, so it should be secure for now
Copy file name to clipboardexpand all lines: 00-Google-Cloud.md
+15-10
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,22 @@
1
1
# Day 0 - Creating Your Own Server - with Google Cloud Platform Free Tier
2
2
3
-
_(DRAFT: Use this as a guide, but it has not been fully tested. Please let us know of any issues with it)_
3
+
_(DRAFT: Use this as a guide, but it has not been fully tested. Please let us know of any issues with it)_
4
4
5
5
## INTRO
6
-
First, you need a server. You can't really learn about administering a remote Linux server without having a one of your own - so today we're going get one - completly free!
7
6
8
-
Through the magic of Linux and virtualisation, it's now possible to get a small Internet server setup almost instantly - and at very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a datacentre somewhere a single physical server running Linux will be split into a dozen or more Virtual servers using the KVM (Kernel-based Virtual Machine) feature that's been part of Linux since early 2007.
7
+
First, you need a server. You can't really learn about administering a remote Linux server without having a one of your own - so today we're going get one - completely free!
9
8
10
-
As well as a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
11
-
12
-
These instruction will walk you through using Google Cloud "Free Tier" (https://cloud.google.com) as your VPS hosting provider. They are rated highly, with a very simple and slick interface. Although we'll be using the Free Tier, be warned that you will need to provide valid credit card information. (Of course, if you have a strong reason to use another provider, then by all means do so, but be sure to choose Ubuntu Server 20.04)
9
+
Through the magic of Linux and virtualisation, it's now possible to get a small Internet server setup almost instantly - and at very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a datacentre somewhere a single physical server running Linux will be split into a dozen or more Virtual servers using the KVM (Kernel-based Virtual Machine) feature that's been part of Linux since early 2007.
10
+
11
+
As well as a hosting provider, we also need to choose which "flavour" of Linux to install on our server. If you're new to Linux then the range of "distributions" available can be confusing - but the latest LTS ("Long Term Support") version of Ubuntu Server is a popular choice, and what you'll need for this course.
12
+
13
+
These instruction will walk you through using Google Cloud "Free Tier" (<https://cloud.google.com>) as your VPS hosting provider. They are rated highly, with a very simple and slick interface. Although we'll be using the Free Tier, be warned that you will need to provide valid credit card information. (Of course, if you have a strong reason to use another provider, then by all means do so, but be sure to choose Ubuntu Server 20.04)
13
14
14
15
## Signing up with GCP
15
-
Signup is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA - a second method of authentication.
16
+
17
+
Sign-up is fairly simple - just provide your email address and a password of your choosing - along with a phone number for a 2FA - a second method of authentication.
16
18
You will need to also provide your VISA or other credit card information.
19
+
17
20
* Choose "Compute Engine" and click "VM Instances".
18
21
* Create a new instance.
19
22
* Select whichever regions you want.
@@ -31,19 +34,20 @@ Set "Source IP Ranges" to "0.0.0.0/0"
31
34
Set "Protocols and Ports" to "Allow All"
32
35
Create and repeat the steps by creating a new Firewall and setting "Direction of Traffic" to "Egress"
33
36
34
-
## Logging in for the first time.
37
+
## Logging in for the first time
38
+
35
39
Select your instance and click "ssh" it will open a new window console. To access the root, type "sudo -i passwd" in the command line then set your own password. Log in by typing "su" and "password". Note that the password won't show as you type or paste it.
36
40
37
41
## Setting up SSH
38
-
You can also refer to https://cloud.google.com/compute/docs/instances/connecting-advanced#thirdpartytools if you intend to access your server via third-party tools (e.g. Putty).
42
+
43
+
You can also refer to <https://cloud.google.com/compute/docs/instances/connecting-advanced#thirdpartytools> if you intend to access your server via third-party tools (e.g. Putty).
39
44
40
45
## You are now a sysadmin
41
46
42
47
Confirm that you can do administrative tasks by typing:
43
48
44
49
`sudo apt update`
45
50
46
-
47
51
Then:
48
52
49
53
`sudo apt upgrade`
@@ -55,6 +59,7 @@ To logout, type _logout_ or _exit_.
55
59
Your server is now all set up and ready for the course!
56
60
57
61
Note that:
62
+
58
63
* This server is now running, and completely exposed to the whole of the Internet
59
64
* You alone are responsible for managing it
60
65
* You have just installed the latest updates, so it should be secure for now
0 commit comments