r/linuxupskillchallenge • • Dec 26 '21

Spread the word! Next course starts on Monday, 3 January 2022

54 Upvotes

Just a reminder that the course always restarts on the first Monday of the next month. Don't forget to spread the word and bring your friends!


r/linuxupskillchallenge • • Mar 27 '22

Spread the word! Next course starts on Monday, 4 April 2022

53 Upvotes

Just a reminder that the course always restarts on the first Monday of the next month. Don't forget to spread the word and bring your friends!


r/linuxupskillchallenge • • Sep 26 '21

Spread the word! Next course starts on Monday, 4 October 2021

53 Upvotes

Just a reminder that the course always restarts on the first Monday of the next month. Don't forget to spread the word and bring your friends!


r/linuxupskillchallenge • • May 28 '21

ISP Internal Challenge

52 Upvotes

Hi everyone.

First of all, thanks for running this course, it's an invaluable resource for those just getting started.

As the sole sysadmin for our ISP in Tasmania I thought it would be good to ask the team if anyone wants to take a stab at this and I will help them along the way.

The response was actually really good, we have 11 students from all different departments that are going to attempt this so I've been templating AWS EC2 machines for them.

Expect a large portion of our company to be posting here in the next few weeks.

Good luck everyone!


r/linuxupskillchallenge • • Nov 01 '20

Welcome to 380 new "students"!

52 Upvotes

That might sound a lot, it's actually the lowest for some time (we had 1,500 in September!)

So, please introduce yourselves, chat and ask qustions - and let us all know what you've learnt each day. Gives everyone a buzz to see what others are doing.


r/linuxupskillchallenge • • Sep 25 '22

Spread the word! Next course starts on Monday, 3 October 2022

51 Upvotes

Just a reminder that the course always restarts on the first Monday of the next month. Don't forget to spread the word and bring your friends!


r/linuxupskillchallenge • • Nov 25 '21

Day 0 - Creating Your Own Server - without a credit card

51 Upvotes

READ THIS FIRST! HOW THIS WORKS & FAQ

INTRO

We normally recommend using Amazon's AWS "Free Tier" (http://aws.amazon.com) or Digital Ocean (https://digitalocean.com) - but both require that you have a credit card. The same is true of the Microsoft Azure, Google's GCP and the vast majority of providers listed at Low End Box (https://lowendbox.com/).

Some will accept PayPal, or Bitcoin - but typically those who don't have a credit card don't have these either.

Note that many will also require you to be over 18 (but not all), and this is true also of some of the options blow.

WARNING: If you go searching too deeply for options in this area, you're very likely to come across a range of scammy, fake, or fraudulent sites. While we've tried to eliminate these from the links below, please do be careful! It should go without saying that none of these are "affiliate" links, and we get no kick-backs from any of them :-)

So, if you are in this situation, below are some of your options:

Kind of a free trial

  • https://cloud.ibm.com/ - Hyper Protect Virtual Server is no longer available for free accounts like it used to. Now you have to upgrade to a Pay-As-You-Go account to receive a $200 credit.

Educational packs

Comparison

ProviderInstant Activation?Must be a student?VPS ramVPS cpu countTimeCredits
AzureYesYes1gb/ 512mb*21/21 year, renewed up to 4 years$100
IBM CloudYesNo2gb130 daysN/A
AWS educateNoYes (Github student pack)?????????$100
Digital OceanNoYes (Github student pack)?????????$50

Cards that work as, or like, credit cards

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now

Or you can just work with a local virtual machine

You can run the challenge on a home server and all the commands will work as they would on a cloud server. However, not being exposed to the wild certainly loses the feel of what real sysadmins have to face.

If you set your own VM at a private server, go for the minimum requirements like 1GHz CPU core, 512MB RAM, and a couple of gigs of disk space. You can always adapt this to your heart's desire (or how much hardware you have available).

Our recommendation is: use a cloud server if you can, to get the full experience, but don't get limited by it. This is your server.


r/linuxupskillchallenge • • Jan 23 '22

Spread the word! Next course starts on Monday, 7 February 2022

50 Upvotes

Just a reminder that the course always restarts on the first Monday of the next month. Don't forget to spread the word and bring your friends!


r/linuxupskillchallenge • • Sep 30 '21

Day 0 - Creating Your Own Server - without a credit card

50 Upvotes

READ THIS FIRST! HOW THIS WORKS & FAQ

INTRO

We normally recommend using Amazon's AWS "Free Tier" (http://aws.amazon.com) or Digital Ocean (https://digitalocean.com) - but both require that you have a credit card. The same is true of the Microsoft Azure, Google's GCP and the vast majority of providers listed at Low End Box (https://lowendbox.com/).

Some will accept PayPal, or Bitcoin - but typically those who don't have a credit card don't have these either.

Note that many will also require you to be over 18 (but not all), and this is true also of some of the options blow.

WARNING: If you go searching too deeply for options in this area, you're very likely to come across a range of scammy, fake, or fraudulent sites. While we've tried to eliminate these from the links below, please do be careful! It should go without saying that none of these are "affiliate" links, and we get no kick-backs from any of them :-)

So, if you are in this situation, below are some of your options:

Kind of a free trial

  • https://cloud.ibm.com/ - Hyper Protect Virtual Server is no longer available for free accounts like it used to. Now you have to upgrade to a Pay-As-You-Go account to receive a $200 credit.

Educational packs

Comparison

ProviderInstant Activation?Must be a student?VPS ramVPS cpu countTimeCredits
AzureYesYes1gb/ 512mb*21/21 year, renewed up to 4 years$100
IBM CloudYesNo2gb130 daysN/A
AWS educateNoYes (Github student pack)?????????$100
Digital OceanNoYes (Github student pack)?????????$50

Cards that work as, or like, credit cards

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now

Or you can just work with a local virtual machine

You can run the challenge on a home server and all the commands will work as they would on a cloud server. However, not being exposed to the wild certainly loses the feel of what real sysadmins have to face.

If you set your own VM at a private server, go for the minimum requirements like 1GHz CPU core, 512MB RAM, and a couple of gigs of disk space. You can always adapt this to your heart's desire (or how much hardware you have available).

Our recommendation is: use a cloud server if you can, to get the full experience, but don't get limited by it. This is your server.


r/linuxupskillchallenge • • Jul 29 '21

Day 0 - Creating Your Own Server - with AWS Free Tier

50 Upvotes

INTRO

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!

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.

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.

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)

Signing up with AWS

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. You will need to also provide your VISA or other credit card information.

  • For Support Plan, choose "Basic Plan/Free"

Logout, then login again, and then select:

  • Services - from the top menu

  • EC2 - from the list of services

In "AWS speak" the server we'll create will be an "EC2 compute instance" - so now choose "Launch Instance". You will be presented with several image options - choose one with "Ubuntu Server 20.04 LTS" in the name. At the next screen you'll have options for the type - typically only "t2.micro" is eligible for the Free Tier, but this is fine, so select to "review and Launch" At the review screen there will be an option "Security Groups" - this is in fact a firewall configuration which AWS provides by default. While a good thing in general, for our purposes we want our server completely exposed, so we'll edit this to effectively disable it, like this:

  • Select "Configure Security Group"

  • Select "Add Rule"

  • Type: "All traffic", Source: "Anywhere"

This opens all ports and protocols to access from anywhere. While this might be unwise for a production server, it is what we want for this course.

Now select "Launch". When prompted for a key pair, create one.

Your server instance should now launch, and you can login to it by:

  • Services, EC2, Running instances, Connect

Remote access via SSH

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.

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.

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.

You are now a sysadmin

Confirm that you can do administrative tasks by typing:

sudo apt update

(Normally you'd expect this would prompt you to confirm your password, but because you're using public key authentication the system hasn't prompted you to set up a password - and AWS have configured sudo to not request one for "ubuntu").

Then:

sudo apt upgrade

Don't worry too much about the output and messages from these commands, but it should be clear whether they succeeded or not. (Reply to any prompts by taking the default option). These commands are how you force the installation of updates on an Ubuntu Linux system, and only an administrator can do them.

To logout, type logout or exit.

Your server is now all set up and ready for the course!

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now


r/linuxupskillchallenge • • Jul 01 '21

Day 0 - Creating Your Own Server - without a credit card

50 Upvotes

INTRO

We normally recommend using Amazon's AWS "Free Tier" (http://aws.amazon.com) or Digital Ocean (https://digitalocean.com) - but both require that you have a credit card. The same is true of the Microsoft Azure, Google's GCP and the vast majority of providers listed at Low End Box (https://lowendbox.com/).

Some will accept PayPal, or Bitcoin - but typically those who don't have a credit card don't have these either.

Note that many will also require you to be over 18 (but not all), and this is true also of some of the options blow.

WARNING: If you go searching too deeply for options in this area, you're very likely to come across a range of scammy, fake, or fraudulent sites. While we've tried to eliminate these from the links below, please do be careful! It should go without saying that none of these are "affiliate" links, and we get no kick-backs from any of them :-)

So, if you are in this situation, below are some of your options:

Kind of a free trial

  • https://cloud.ibm.com/ - Hyper Protect Virtual Server is no longer available for free accounts like it used to. Now you have to upgrade to a Pay-As-You-Go account to receive a $200 credit.

Educational packs

Comparison

ProviderInstant Activation?Must be a student?VPS ramVPS cpu countTimeCredits
AzureYesYes1gb/ 512mb*21/21 year, renewed up to 4 years$100
IBM CloudYesNo2gb130 daysN/A
AWS educateNoYes (Github student pack)?????????$100
Digital OceanNoYes (Github student pack)?????????$50

Cards that work as, or like, credit cards

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now

Or you can just work with a local virtual machine

You can run the challenge on a home server and all the commands will work as they would on a cloud server. However, not being exposed to the wild certainly loses the feel of what real sysadmins have to face.

If you set your own VM at a private server, go for the minimum requirements like 1GHz CPU core, 512MB RAM, and a couple of gigs of disk space. You can always adapt this to your heart's desire (or how much hardware you have available).

Our recommendation is: use a cloud server if you can, to get the full experience, but don't get limited by it. This is your server.


r/linuxupskillchallenge • • Feb 23 '21

Day 0 - Creating Your Own Server - with AWS Free Tier

50 Upvotes

INTRO

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!

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.

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.

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)

Signing up with AWS

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. You will need to also provide your VISA or other credit card information.

  • For Support Plan, choose "Basic Plan/Free"

Logout, then login again, and then select:

  • Services - from the top menu

  • EC2 - from the list of services

In "AWS speak" the server we'll create will be an "EC2 compute instance" - so now choose "Launch Instance". You will be presented with several image options - choose one with "Ubuntu Server 20.04 LTS" in the name. At the next screen you'll have options for the type - typically only "t2.micro" is eligible for the Free Tier, but this is fine, so select to "review and Launch" At the review screen there will be an option "Security Groups" - this is in fact a firewall configuration which AWS provides by default. While a good thing in general, for our purposes we want our server completely exposed, so we'll edit this to effectively disable it, like this:

  • Select "Configure Security Group"

  • Select "Add Rule"

  • Type: "All traffic", Source: "Anywhere"

This opens all ports and protocols to access from anywhere. While this might be unwise for a production server, it is what we want for this course.

Now select "Launch". When prompted for a key pair, create one.

Your server instance should now launch, and you can login to it by:

  • Services, EC2, Running instances, Connect

Remote access via SSH

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.

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.

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.

You are now a sysadmin

Confirm that you can do administrative tasks by typing:

sudo apt update

(Normally you'd expect this would prompt you to confirm your password, but because you're using public key authentication the system hasn't prompted you to set up a password - and AWS have configured sudo to not request one for "ubuntu").

Then:

sudo apt upgrade

Don't worry too much about the output and messages from these commands, but it should be clear whether they succeeded or not. (Reply to any prompts by taking the default option). These commands are how you force the installation of updates on an Ubuntu Linux system, and only an administrator can do them.

To logout, type logout or exit.

Your server is now all set up and ready for the course!

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now


r/linuxupskillchallenge • • Jan 02 '22

Day 1 - Get to know your server

49 Upvotes

INTRO

You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.

Once you have reached a level of comfort at the command-line then you'll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple's OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you'll be working on Linux - but in fact most of what is covered is applicable to any system in the "UNIX family" - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!

Although there is a "root" user, you will be logging in and working from the user account that you setup. Because this is a member of the group "sudo" it is able to run commands "as root" by preceding them with "sudo".

YOUR TASKS TODAY:

  • Connect and login remotely to your server

  • Run a few simple simple commands to check the status of your server

  • Change your password

INSTRUCTIONS

Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (“Secure SHell) protocol is always used.

If you're using any Linux or Unix system, including Apple's MacOS, then you can simply open up a "terminal" session and use your command-line ssh client like this:

ssh user@<ip address>

For example:

ssh [email protected]

On Linux distributions with a menu you'll typically find the terminal under "Applications menu -> Accessories -> Terminal", "Applications menu -> System -> Terminal" or "Menu -> System -> Terminal Program (Konsole)"- or you can simply search for your terminal application. In many cases Ctrl+Alt+T will also bring up a terminal windows.

If you have configured the remote server with your SSH public key (see "Password-less SSH login" in the EXTENSION section of this post), then you'll need to point to the location of the private part as proof of identity with the "-i" switch, typically like this:

ssh -i ~/.ssh/id_rsa [email protected]

A very slick connection process can be setup with the .ssh/config feature - see the "SSH client configuration" link in the EXTENSION section below.

On an MacOS machine you'll normally access the command line via Terminal.app - it's in the Utilities sub-folder of Applications.

On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via "Settings", "Apps", "Apps & features", "Manage optional features", "Add a feature", "OpenSSH client".

Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.

There are also GUI SSH clients for Windows (PuTTY, MobaXterm) and MacOS (Terminal.app, iTerm2).

Regardless of which client you use, the first time you connect to your server, you may receive a warning that you're connecting to a new server - and be asked if you wish to "cache the host key". Do this. Now, if you get a warning in future connections it means that either: (a) you are being fooled into connecting to a different machine or (b) someone may be trying a "man in the middle" attack.

So, now login to your server as your user - and remember that Linux is case-sensitive regarding user names, as well as passwords.

Once logged in, notice that the "command prompt” that you receive ends in $ - this is the convention for an ordinary user, whereas the "root" user with full administrative power has a # prompt.

Try these simple commands:

ls

uptime

free

df -h

uname -a

If you're using a password to login (rather than public key), then now is a good time to ensure that this is very strong and unique - i.e. At least 10 characters - because your server is fully exposed to bots that will be continuously attempting to break in. Use the passwd command to change your password. To do this, think of a new, secure password, then simply type passwd, press “Enter” and give your current password when prompted, then the new one you've chosen, confirm it - and then WRITE IT DOWN somewhere. In a production system of course, public keys and/or two factor authentication would be more appropriate.

It's very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your setup.

Log out by typing exit.

You'll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try "black on white" and "green on black" - and experiment with different monospaced fonts, ("Ubuntu Mono" is free to download, and very nice).

POSTING YOUR PROGRESS

Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit a small introduction of yourself, and your Linux background for your "classmates" - and notes on how each day has gone.

Of course, also drop in a note if you get stuck or spot errors in these notes.

WRAP

You now have the ability to login remotely to your own server. Perhaps you might now try logging in from home and work - even from your smartphone! - using an ssh client app such as "Termux". As a server admin you'll need to be comfortable logging in from all over. You can also potentially use JavaScript ssh clients (search for "consolefish"), or from a cybercafe - but these options involve putting more trust in third-parties than most sysadmins would be comfortable with when accessing production systems.

A NOTE ON "HARDENING"

Your server is protected by the fact that its security updates are up to date, and that you've set Long Strong Unique passwords - or are using public keys. While exposed to the world, and very likely under continuous attack, it should be perfectly secure. Next week we'll look at how we can view those attacks, but for now it's simply important to state that while it's OK to read up on "SSH hardening", things such as changing the default port and fail2ban are unnecessary and unhelpful when we're trying to learn - and you are perfectly safe without them.

EXTENSION

If this is all too easy, then spend some time reading up on:

RESOURCES

Copyright 2012-2021 @snori74 (Steve Brorens). Can be reused under the terms of the Creative Commons Attribution 4.0 International Licence (CC BY 4.0).


r/linuxupskillchallenge • • May 01 '23

Day 0 - Creating Your Own Local Server

48 Upvotes

READ THIS FIRST! HOW THIS WORKS & FAQ

It's difficult to create a server in cloud without a credit card

We normally recommend using Amazon's AWS "Free Tier" or Digital Ocean - but both require that you have a credit card. The same is true of the Microsoft Azure, Google's GCP and the vast majority of providers listed at Low End Box (https://lowendbox.com/).

Some will accept PayPal, or Bitcoin - but typically those who don't have a credit card don't have these either.

WARNING: If you go searching too deeply for options in this area, you're very likely to come across a range of scammy, fake, or fraudulent sites. While we've tried to eliminate these from the links below, please do be careful! It should go without saying that none of these are "affiliate" links, and we get no kick-backs from any of them :-)

Cards that work as, or like, credit cards

But what if I don’t want to use a cloud provider? You can just work with a local virtual machine

You can run the challenge on a home server and all the commands will work as they would on a cloud server. However, not being exposed to the wild certainly loses the feel of what real sysadmins have to face.

If you set your own VM at a private server, go for the minimum requirements like 1GHz CPU core, 1GB RAM, and a couple of gigs of disk space. You can always adapt this to your heart's desire (or how much hardware you have available).

Our recommendation is: use a cloud server if you can, to get the full experience, but don't get limited by it. This is your server.

Download the Linux ISO

Go to the Official Ubuntu page and download the latest LTS (Long Term Support) available version.

NOTE: download the server version, NOT the desktop version.

Create a Virtual Machine with VirtualBox

Install VirtualBox, when ready:

  • Click on Machine > New

  • Give a name to your VM and select the Type Linux. Click Next.

  • Adjust hardware: 1024MB memory and 1 CPU (this is the minimum, but you can reserve more if your host machine can provide it). Click Next

  • Virtual hard disk: 2,5GB is minimum, 5GB is a good number. Click Next.

  • Finish but we're not done yet.

  • The new VM should show up in a list of VMs, select it.

  • Click on Machine > Settings

  • Click on Storage. Right-click on Controllet IDE, click on Optical Drive.

  • Select the ISO from the list if available, if not click Add and find it in your directories. Click Choose.

  • Click on Network and change the network adapter to Bridged Adapter.

  • Click OK

  • Click Start or Machine > Start > Normal Start.

Installing Linux

After a few seconds the welcome screen will load. At the end of each page there's DONE and BACK buttons. Use arrow keys and the enter key to select options. When you're ok with your selection, use the arrow key to go down to DONE and enter to go to the next page.

  • Welcome Screen: Select your language

  • Keyboard Configuration: Select Keyboard type

  • Choose type of install: Select Ubuntu Server (minimized). It comes with most of the packages you need without being bloated. It will install faster too.

  • Network Connections: If you have setup the VM to use a bridged adapter like instructed, you don’t really have to worry a lot. The installer will automatically detect the DHCP settings from your local network router and you just have to select DONE.

  • Configure Proxy: If your system requires any http proxy to connect to the internet enter the proxy address, otherwise just select DONE.

  • Configure Ubuntu archive mirror: Leave it as default. DONE.

  • Guided Storage Configurations: We are going to utilize the entire storage space reserved for this VM and that's why we select Use the Entire Disk option.

  • Storage Configuration: Leave it the standard storage configuration and select DONE. When prompted to confirm, don't worry. This will only use the VM disk, not your computer disk.

  • Profile Setup: Enter your name, your server’s name, your username and password. This user will be your administrator user in the system (or sudo), so don't forget this password.

  • Update to Ubuntu Pro: No. Skip for now.

  • SSH setup: Select on Install OpenSSH server because that’s how you will connect to your server later.

  • Featured Server Snaps: None of these packages are important now, just select DONE.

  • Installing System: Now you have to wait for a few minutes for your system to install. You can "cheat" and speed up the install by skipping the downloading of updates, select Cancel update and Reboot when it appears at the bottom of the page, a few moments later. You can complete the updates after the first boot. After the installation is complete the system will reboot automatically.

Logging in for the first time

After the first reboot, it will show a black screen asking for the login. That's when you use that username and password you created during the install.

Note: the password will not show up, not even ***, just trust that is taking it in.

If you need to find out the IP address for the VM, just type in the console:

ip address

That will give you the inet, i.e., the ip address.

Remote access via SSH

If you are using windows download Putty and follow the instructions to connect.

If you are on Linux or MacOS, open a terminal and run the command:

ssh username@ip_address

Enter your password

Voila! You have just accessed your system inside your private network.

You are now a sysadmin

Confirm that you can do administrative tasks by typing:

sudo apt update

Then:

sudo apt upgrade -y

Don't worry too much about the output and messages from these commands, but it should be clear whether they succeeded or not. (Reply to any prompts by taking the default option). These commands are how you force the installation of updates on an Ubuntu Linux system, and only an administrator can do them.

REBOOT

When a kernel update is identified in this first check for updates, this is one of the few occasions you will need to reboot your server, so go for it after the update is done:

sudo reboot now

Your server is now all set up and ready for the course!

Note that:

  • This server is now running but is not exposed to the Internet, i.e. other people will not be able to attempt to connect. We recommend you keep it that way. It is one thing to expose a server in the cloud, exposing your home network is another story. For your own security, don't do it.

To logout, type logout or exit.

When you are done

Just type:

sudo shutdown now

Or click on Force Shutdown

Some Other Options

Now you are ready to start the challenge. Day 1, here we go!


r/linuxupskillchallenge • • Feb 06 '23

Day 1 - Get to know your server

48 Upvotes

INTRO

You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.

Once you have reached a level of comfort at the command-line then you'll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple's OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you'll be working on Linux - but in fact most of what is covered is applicable to any system in the "UNIX family" - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!

Although there is a "root" user, you will be logging in and working from the user account that you setup. Because this is a member of the group "sudo" it is able to run commands "as root" by preceding them with "sudo".

YOUR TASKS TODAY:

  • Connect and login remotely to your server

  • Run a few simple simple commands to check the status of your server

  • Change your password

INSTRUCTIONS

Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (“Secure SHell) protocol is always used.

If you're using any Linux or Unix system, including Apple's MacOS, then you can simply open up a "terminal" session and use your command-line ssh client like this:

ssh user@<ip address>

For example:

ssh [email protected]

On Linux distributions with a menu you'll typically find the terminal under "Applications menu -> Accessories -> Terminal", "Applications menu -> System -> Terminal" or "Menu -> System -> Terminal Program (Konsole)"- or you can simply search for your terminal application. In many cases Ctrl+Alt+T will also bring up a terminal windows.

If you have configured the remote server with your SSH public key (see "Password-less SSH login" in the EXTENSION section of this post), then you'll need to point to the location of the private part as proof of identity with the "-i" switch, typically like this:

ssh -i ~/.ssh/id_rsa [email protected]

A very slick connection process can be setup with the .ssh/config feature - see the "SSH client configuration" link in the EXTENSION section below.

On an MacOS machine you'll normally access the command line via Terminal.app - it's in the Utilities sub-folder of Applications.

On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via "Settings", "Apps", "Apps & features", "Manage optional features", "Add a feature", "OpenSSH client").

Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.

There are also GUI SSH clients for Windows (PuTTY, MobaXterm) and MacOS (Terminal.app, iTerm2). If you use Windows versions older than 10, the installation of PuTTY is suggested.

Regardless of which client you use, the first time you connect to your server, you may receive a warning that you're connecting to a new server - and be asked if you wish to "cache the host key". Do this. Now, if you get a warning in future connections it means that either: (a) you are being fooled into connecting to a different machine or (b) someone may be trying a "man in the middle" attack.

So, now login to your server as your user - and remember that Linux is case-sensitive regarding user names, as well as passwords.

Once logged in, notice that the "command prompt” that you receive ends in $ - this is the convention for an ordinary user, whereas the "root" user with full administrative power has a # prompt.

Try these simple commands:

ls

uptime

free

df -h

uname -a

If you're using a password to login (rather than public key), then now is a good time to ensure that this is very strong and unique - i.e. At least 10 characters - because your server is fully exposed to bots that will be continuously attempting to break in. Use the passwd command to change your password. To do this, think of a new, secure password, then simply type passwd, press “Enter” and give your current password when prompted, then the new one you've chosen, confirm it - and then WRITE IT DOWN somewhere. In a production system of course, public keys and/or two factor authentication would be more appropriate.

It's very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your setup.

Log out by typing exit.

You'll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try "black on white" and "green on black" - and experiment with different monospaced fonts, ("Ubuntu Mono" is free to download, and very nice).

POSTING YOUR PROGRESS

Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit a small introduction of yourself, and your Linux background for your "classmates" - and notes on how each day has gone.

A discord server is also available.

Of course, also drop in a note if you get stuck or spot errors in these notes.

WRAP

You now have the ability to login remotely to your own server. Perhaps you might now try logging in from home and work - even from your smartphone! - using an ssh client app such as "Termux". As a server admin you'll need to be comfortable logging in from all over. You can also potentially use JavaScript ssh clients (search for "consolefish"), or from a cybercafe - but these options involve putting more trust in third-parties than most sysadmins would be comfortable with when accessing production systems.

A NOTE ON "HARDENING"

Your server is protected by the fact that its security updates are up to date, and that you've set Long Strong Unique passwords - or are using public keys. While exposed to the world, and very likely under continuous attack, it should be perfectly secure. Next week we'll look at how we can view those attacks, but for now it's simply important to state that while it's OK to read up on "SSH hardening", things such as changing the default port and fail2ban are unnecessary and unhelpful when we're trying to learn - and you are perfectly safe without them.

EXTENSION

If this is all too easy, then spend some time reading up on:

RESOURCES

Copyright 2012-2021 @snori74 (Steve Brorens). Can be reused under the terms of the Creative Commons Attribution 4.0 International Licence (CC BY 4.0).


r/linuxupskillchallenge • • Apr 28 '22

Day 0 - Creating Your Own Server - without a credit card

48 Upvotes

READ THIS FIRST! HOW THIS WORKS & FAQ

INTRO

We normally recommend using Amazon's AWS "Free Tier" (http://aws.amazon.com) or Digital Ocean (https://digitalocean.com) - but both require that you have a credit card. The same is true of the Microsoft Azure, Google's GCP and the vast majority of providers listed at Low End Box (https://lowendbox.com/).

Some will accept PayPal, or Bitcoin - but typically those who don't have a credit card don't have these either.

Note that many will also require you to be over 18 (but not all), and this is true also of some of the options blow.

WARNING: If you go searching too deeply for options in this area, you're very likely to come across a range of scammy, fake, or fraudulent sites. While we've tried to eliminate these from the links below, please do be careful! It should go without saying that none of these are "affiliate" links, and we get no kick-backs from any of them :-)

So, if you are in this situation, below are some of your options:

Educational packs

Comparison

ProviderInstant Activation?Must be a student?VPS ramVPS cpu countTimeCredits
AzureYesYes1gb/ 512mb*21/21 year, renewed up to 4 years$100
AWS educateNoYes (Github student pack)?????????$100
Digital OceanNoYes (Github student pack)?????????$50

Cards that work as, or like, credit cards

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now

But what if I don’t want to use a cloud provider? I have a server/VM at home.

Then use your server.

Or you can just work with a local virtual machine

You can run the challenge on a home server and all the commands will work as they would on a cloud server. However, not being exposed to the wild certainly loses the feel of what real sysadmins have to face.

If you set your own VM at a private server, go for the minimum requirements like 1GHz CPU core, 512MB RAM, and a couple of gigs of disk space. You can always adapt this to your heart's desire (or how much hardware you have available).

Our recommendation is: use a cloud server if you can, to get the full experience, but don't get limited by it. This is your server.


r/linuxupskillchallenge • • Feb 06 '22

Day 1 - Get to know your server

48 Upvotes

INTRO

You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.

Once you have reached a level of comfort at the command-line then you'll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple's OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you'll be working on Linux - but in fact most of what is covered is applicable to any system in the "UNIX family" - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!

Although there is a "root" user, you will be logging in and working from the user account that you setup. Because this is a member of the group "sudo" it is able to run commands "as root" by preceding them with "sudo".

YOUR TASKS TODAY:

  • Connect and login remotely to your server

  • Run a few simple simple commands to check the status of your server

  • Change your password

INSTRUCTIONS

Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (“Secure SHell) protocol is always used.

If you're using any Linux or Unix system, including Apple's MacOS, then you can simply open up a "terminal" session and use your command-line ssh client like this:

ssh user@<ip address>

For example:

ssh [email protected]

On Linux distributions with a menu you'll typically find the terminal under "Applications menu -> Accessories -> Terminal", "Applications menu -> System -> Terminal" or "Menu -> System -> Terminal Program (Konsole)"- or you can simply search for your terminal application. In many cases Ctrl+Alt+T will also bring up a terminal windows.

If you have configured the remote server with your SSH public key (see "Password-less SSH login" in the EXTENSION section of this post), then you'll need to point to the location of the private part as proof of identity with the "-i" switch, typically like this:

ssh -i ~/.ssh/id_rsa [email protected]

A very slick connection process can be setup with the .ssh/config feature - see the "SSH client configuration" link in the EXTENSION section below.

On an MacOS machine you'll normally access the command line via Terminal.app - it's in the Utilities sub-folder of Applications.

On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via "Settings", "Apps", "Apps & features", "Manage optional features", "Add a feature", "OpenSSH client".

Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.

There are also GUI SSH clients for Windows (PuTTY, MobaXterm) and MacOS (Terminal.app, iTerm2).

Regardless of which client you use, the first time you connect to your server, you may receive a warning that you're connecting to a new server - and be asked if you wish to "cache the host key". Do this. Now, if you get a warning in future connections it means that either: (a) you are being fooled into connecting to a different machine or (b) someone may be trying a "man in the middle" attack.

So, now login to your server as your user - and remember that Linux is case-sensitive regarding user names, as well as passwords.

Once logged in, notice that the "command prompt” that you receive ends in $ - this is the convention for an ordinary user, whereas the "root" user with full administrative power has a # prompt.

Try these simple commands:

ls

uptime

free

df -h

uname -a

If you're using a password to login (rather than public key), then now is a good time to ensure that this is very strong and unique - i.e. At least 10 characters - because your server is fully exposed to bots that will be continuously attempting to break in. Use the passwd command to change your password. To do this, think of a new, secure password, then simply type passwd, press “Enter” and give your current password when prompted, then the new one you've chosen, confirm it - and then WRITE IT DOWN somewhere. In a production system of course, public keys and/or two factor authentication would be more appropriate.

It's very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your setup.

Log out by typing exit.

You'll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try "black on white" and "green on black" - and experiment with different monospaced fonts, ("Ubuntu Mono" is free to download, and very nice).

POSTING YOUR PROGRESS

Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit a small introduction of yourself, and your Linux background for your "classmates" - and notes on how each day has gone.

A discord server is also available.

Of course, also drop in a note if you get stuck or spot errors in these notes.

WRAP

You now have the ability to login remotely to your own server. Perhaps you might now try logging in from home and work - even from your smartphone! - using an ssh client app such as "Termux". As a server admin you'll need to be comfortable logging in from all over. You can also potentially use JavaScript ssh clients (search for "consolefish"), or from a cybercafe - but these options involve putting more trust in third-parties than most sysadmins would be comfortable with when accessing production systems.

A NOTE ON "HARDENING"

Your server is protected by the fact that its security updates are up to date, and that you've set Long Strong Unique passwords - or are using public keys. While exposed to the world, and very likely under continuous attack, it should be perfectly secure. Next week we'll look at how we can view those attacks, but for now it's simply important to state that while it's OK to read up on "SSH hardening", things such as changing the default port and fail2ban are unnecessary and unhelpful when we're trying to learn - and you are perfectly safe without them.

EXTENSION

If this is all too easy, then spend some time reading up on:

RESOURCES

Copyright 2012-2021 @snori74 (Steve Brorens). Can be reused under the terms of the Creative Commons Attribution 4.0 International Licence (CC BY 4.0).


r/linuxupskillchallenge • • Jul 04 '21

Day 1 - Accessing your server

47 Upvotes

INTRO

You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.

Once you have reached a level of comfort at the command-line then you'll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple's OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you'll be working on Linux - but in fact most of what is covered is applicable to any system in the "UNIX family" - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!

Although there is a "root" user, you will be logging in and working from the user account that you setup. Because this is a member of the group "sudo" it is able to run commands "as root" by preceding them with "sudo".

YOUR TASKS TODAY:

  • Connect and login remotely to your server

  • Run a few simple simple commands to check the status of your server

  • Change your password

INSTRUCTIONS

Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (“Secure SHell) protocol is always used.

If you're using any Linux or Unix system, including Apple's MacOS, then you can simply open up a "terminal" session and use your command-line ssh client like this:

ssh user@<ip address>

For example:

ssh [email protected]

On Linux distributions with a menu you'll typically find the terminal under "Applications menu -> Accessories -> Terminal", "Applications menu -> System -> Terminal" or "Menu -> System -> Terminal Program (Konsole)"- or you can simply search for your terminal application. In many cases Ctrl+Alt+T will also bring up a terminal windows.

If you have configured the remote server with your SSH public key (see "Password-less SSH login" in the EXTENSION section of this post), then you'll need to point to the location of the private part as proof of identity with the "-i" switch, typically like this:

ssh -i ~/.ssh/id_rsa [email protected]

A very slick connection process can be setup with the .ssh/config feature - see the "SSH client configuration" link in the EXTENSION section below.

On an MacOS machine you'll normally access the command line via Terminal.app - it's in the Utilities sub-folder of Applications.

On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via "Settings", "Apps", "Apps & features", "Manage optional features", "Add a feature", "OpenSSH client".

Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.

There are also GUI SSH clients for Windows (PuTTY, MobaXterm) and MacOS (Terminal.app, iTerm2).

Regardless of which client you use, the first time you connect to your server, you may receive a warning that you're connecting to a new server - and be asked if you wish to "cache the host key". Do this. Now, if you get a warning in future connections it means that either: (a) you are being fooled into connecting to a different machine or (b) someone may be trying a "man in the middle" attack.

So, now login to your server as your user - and remember that Linux is case-sensitive regarding user names, as well as passwords.

Once logged in, notice that the "command prompt” that you receive ends in $ - this is the convention for an ordinary user, whereas the "root" user with full administrative power has a # prompt.

Try these simple commands:

ls

uptime

free

df -h

uname -a

If you're using a password to login (rather than public key), then now is a good time to ensure that this is very strong and unique - i.e. At least 10 characters - because your server is fully exposed to bots that will be continuously attempting to break in. Use the passwd command to change your password. To do this, think of a new, secure password, then simply type passwd, press “Enter” and give your current password when prompted, then the new one you've chosen, confirm it - and then WRITE IT DOWN somewhere. In a production system of course, public keys and/or two factor authentication would be more appropriate.

It's very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your setup.

Log out by typing exit.

You'll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try "black on white" and "green on black" - and experiment with different monospaced fonts, ("Ubuntu Mono" is free to download, and very nice).

POSTING YOUR PROGRESS

Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit a small introduction of yourself, and your Linux background for your "classmates" - and notes on how each day has gone.

Of course, also drop in a note if you get stuck or spot errors in these notes.

WRAP

You now have the ability to login remotely to your own server. Perhaps you might now try logging in from home and work - even from your smartphone! - using an ssh client app such as "Termux". As a server admin you'll need to be comfortable logging in from all over. You can also potentially use JavaScript ssh clients (search for "consolefish"), or from a cybercafe - but these options involve putting more trust in third-parties than most sysadmins would be comfortable with when accessing production systems.

A NOTE ON "HARDENING"

Your server is protected by the fact that its security updates are up to date, and that you've set Long Strong Unique passwords - or are using public keys. While exposed to the world, and very likely under continuous attack, it should be perfectly secure. Next week we'll look at how we can view those attacks, but for now it's simply important to state that while it's OK to read up on "SSH hardening", things such as changing the default port and fail2ban are unnecessary and unhelpful when we're trying to learn - and you are perfectly safe without them.

EXTENSION

If this is all too easy, then spend some time reading up on:

RESOURCES

Copyright 2012-2021 @snori74 (Steve Brorens). Can be reused under the terms of the Creative Commons Attribution 4.0 International Licence (CC BY 4.0).


r/linuxupskillchallenge • • Jan 26 '21

Next course starts on Monday, 1 February 2021

47 Upvotes

r/linuxupskillchallenge • • Jan 02 '23

Day 0 - Creating Your Own Server - without a credit card

46 Upvotes

READ THIS FIRST! HOW THIS WORKS & FAQ

INTRO

We normally recommend using Amazon's AWS "Free Tier" (http://aws.amazon.com) or Digital Ocean (https://digitalocean.com) - but both require that you have a credit card. The same is true of the Microsoft Azure, Google's GCP and the vast majority of providers listed at Low End Box (https://lowendbox.com/).

Some will accept PayPal, or Bitcoin - but typically those who don't have a credit card don't have these either.

Note that many will also require you to be over 18 (but not all), and this is true also of some of the options blow.

WARNING: If you go searching too deeply for options in this area, you're very likely to come across a range of scammy, fake, or fraudulent sites. While we've tried to eliminate these from the links below, please do be careful! It should go without saying that none of these are "affiliate" links, and we get no kick-backs from any of them :-)

So, if you are in this situation, below are some of your options:

Educational packs

Comparison

ProviderInstant Activation?Must be a student?VPS ramVPS cpu countTimeCredits
AzureYesYes1gb/ 512mb*21/21 year, renewed up to 4 years$100
AWS educateNoYes (Github student pack)?????????$100
Digital OceanNoYes (Github student pack)?????????$50

Cards that work as, or like, credit cards

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now

But what if I don’t want to use a cloud provider? I have a server/VM at home.

Then use your server.

Or you can just work with a local virtual machine

You can run the challenge on a home server and all the commands will work as they would on a cloud server. However, not being exposed to the wild certainly loses the feel of what real sysadmins have to face.

If you set your own VM at a private server, go for the minimum requirements like 1GHz CPU core, 512MB RAM, and a couple of gigs of disk space. You can always adapt this to your heart's desire (or how much hardware you have available).

Our recommendation is: use a cloud server if you can, to get the full experience, but don't get limited by it. This is your server.


r/linuxupskillchallenge • • Mar 06 '22

Day 1 - Get to know your server

46 Upvotes

INTRO

You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.

Once you have reached a level of comfort at the command-line then you'll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple's OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you'll be working on Linux - but in fact most of what is covered is applicable to any system in the "UNIX family" - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!

Although there is a "root" user, you will be logging in and working from the user account that you setup. Because this is a member of the group "sudo" it is able to run commands "as root" by preceding them with "sudo".

YOUR TASKS TODAY:

  • Connect and login remotely to your server

  • Run a few simple simple commands to check the status of your server

  • Change your password

INSTRUCTIONS

Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (“Secure SHell) protocol is always used.

If you're using any Linux or Unix system, including Apple's MacOS, then you can simply open up a "terminal" session and use your command-line ssh client like this:

ssh user@<ip address>

For example:

ssh [email protected]

On Linux distributions with a menu you'll typically find the terminal under "Applications menu -> Accessories -> Terminal", "Applications menu -> System -> Terminal" or "Menu -> System -> Terminal Program (Konsole)"- or you can simply search for your terminal application. In many cases Ctrl+Alt+T will also bring up a terminal windows.

If you have configured the remote server with your SSH public key (see "Password-less SSH login" in the EXTENSION section of this post), then you'll need to point to the location of the private part as proof of identity with the "-i" switch, typically like this:

ssh -i ~/.ssh/id_rsa [email protected]

A very slick connection process can be setup with the .ssh/config feature - see the "SSH client configuration" link in the EXTENSION section below.

On an MacOS machine you'll normally access the command line via Terminal.app - it's in the Utilities sub-folder of Applications.

On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via "Settings", "Apps", "Apps & features", "Manage optional features", "Add a feature", "OpenSSH client".

Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.

There are also GUI SSH clients for Windows (PuTTY, MobaXterm) and MacOS (Terminal.app, iTerm2).

Regardless of which client you use, the first time you connect to your server, you may receive a warning that you're connecting to a new server - and be asked if you wish to "cache the host key". Do this. Now, if you get a warning in future connections it means that either: (a) you are being fooled into connecting to a different machine or (b) someone may be trying a "man in the middle" attack.

So, now login to your server as your user - and remember that Linux is case-sensitive regarding user names, as well as passwords.

Once logged in, notice that the "command prompt” that you receive ends in $ - this is the convention for an ordinary user, whereas the "root" user with full administrative power has a # prompt.

Try these simple commands:

ls

uptime

free

df -h

uname -a

If you're using a password to login (rather than public key), then now is a good time to ensure that this is very strong and unique - i.e. At least 10 characters - because your server is fully exposed to bots that will be continuously attempting to break in. Use the passwd command to change your password. To do this, think of a new, secure password, then simply type passwd, press “Enter” and give your current password when prompted, then the new one you've chosen, confirm it - and then WRITE IT DOWN somewhere. In a production system of course, public keys and/or two factor authentication would be more appropriate.

It's very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your setup.

Log out by typing exit.

You'll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try "black on white" and "green on black" - and experiment with different monospaced fonts, ("Ubuntu Mono" is free to download, and very nice).

POSTING YOUR PROGRESS

Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit a small introduction of yourself, and your Linux background for your "classmates" - and notes on how each day has gone.

A discord server is also available.

Of course, also drop in a note if you get stuck or spot errors in these notes.

WRAP

You now have the ability to login remotely to your own server. Perhaps you might now try logging in from home and work - even from your smartphone! - using an ssh client app such as "Termux". As a server admin you'll need to be comfortable logging in from all over. You can also potentially use JavaScript ssh clients (search for "consolefish"), or from a cybercafe - but these options involve putting more trust in third-parties than most sysadmins would be comfortable with when accessing production systems.

A NOTE ON "HARDENING"

Your server is protected by the fact that its security updates are up to date, and that you've set Long Strong Unique passwords - or are using public keys. While exposed to the world, and very likely under continuous attack, it should be perfectly secure. Next week we'll look at how we can view those attacks, but for now it's simply important to state that while it's OK to read up on "SSH hardening", things such as changing the default port and fail2ban are unnecessary and unhelpful when we're trying to learn - and you are perfectly safe without them.

EXTENSION

If this is all too easy, then spend some time reading up on:

RESOURCES

Copyright 2012-2021 @snori74 (Steve Brorens). Can be reused under the terms of the Creative Commons Attribution 4.0 International Licence (CC BY 4.0).


r/linuxupskillchallenge • • Mar 03 '22

Day 0 - Creating Your Own Server - with AWS Free Tier

46 Upvotes

READ THIS FIRST! HOW THIS WORKS & FAQ

INTRO

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!

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.

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.

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)

Signing up with AWS

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. You will need to also provide your VISA or other credit card information.

  • For Support Plan, choose "Basic Plan/Free"

Logout, then login again, and then select:

  • Services - from the top menu

  • EC2 - from the list of services

In "AWS speak" the server we'll create will be an "EC2 compute instance" - so now choose "Launch Instance". You will be presented with several image options - choose one with "Ubuntu Server 20.04 LTS" in the name. At the next screen you'll have options for the type - typically only "t2.micro" is eligible for the Free Tier, but this is fine, so select to "review and Launch" At the review screen there will be an option "Security Groups" - this is in fact a firewall configuration which AWS provides by default. While a good thing in general, for our purposes we want our server completely exposed, so we'll edit this to effectively disable it, like this:

  • Select "Configure Security Group"

  • Select "Add Rule"

  • Type: "All traffic", Source: "Anywhere"

This opens all ports and protocols to access from anywhere. While this might be unwise for a production server, it is what we want for this course.

Now select "Launch". When prompted for a key pair, create one.

Your server instance should now launch, and you can login to it by:

  • Services, EC2, Running instances, Connect

Remote access via SSH

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.

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.

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.

You are now a sysadmin

Confirm that you can do administrative tasks by typing:

sudo apt update

(Normally you'd expect this would prompt you to confirm your password, but because you're using public key authentication the system hasn't prompted you to set up a password - and AWS have configured sudo to not request one for "ubuntu").

Then:

sudo apt upgrade

Don't worry too much about the output and messages from these commands, but it should be clear whether they succeeded or not. (Reply to any prompts by taking the default option). These commands are how you force the installation of updates on an Ubuntu Linux system, and only an administrator can do them.

To logout, type logout or exit.

Your server is now all set up and ready for the course!

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now


r/linuxupskillchallenge • • Aug 02 '20

Day 0 - Creating Your Own Server - with a $5 Digital Ocean plan

46 Upvotes

Day 0 - Creating Your Own Server - with a $5 Digital Ocean plan

INTRO

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 to buy one!

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. There are many hundreds of hosting companies offering low cost VPS deals - and sites like http://lowendbox.com/ that compare them.

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.

These instruction 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 18.04)

Signing up with Digital Ocean

Signup is immediate - just provide your email address and a password of your choosing and you're in!

  • Choose "Manage, Droplets" from the left hand sidebar. (a "droplet" is Digital Ocean's cute name for a server!)

  • Select the image "Ubuntu 18.04 LTS" or "Ubuntu 20.04 LTS"

  • For plan, choose "Starter"

  • You'll be prompted to start a $40/m plan, but select "Show all plans", and select the $5/mo one - that's fine for this course.

  • You don't need to add any block storage.

  • Select whichever region you wish.

  • Authentication - choose "Password"

  • Choose a strong password for the root account.

  • Note that since the server is on the Internet it will be under immediate attack from bots attempting to "brute force" the root password. Make it strong!

  • Choose a hostname, because the default ones are pretty ugly.

Logging in for the first time

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.

Creating a working admin account

We want to follow the Best Practice of not logging as "root" remotely, so we'll create an ordinary user account, but one with the power to "become root" as necessary, like this:

sudo adduser snori74
sudo usermod -a -G adm snori74
sudo usermod -a -G sudo snori74

(Of course, replace 'snori74' with your name!)

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.

You are now a sysadmin

Logout as root, by typing logout or exit, then login as your new sysadmin user, and confirm that you can do administrative tasks by typing:

sudo apt update

(you'll be asked to confirm your password)

Then:

sudo apt upgrade

Don't worry too much about the output and messages from these commands, but it should be clear whether they succeeded or not. These commands are how you force the installation of updates on an Ubuntu Linux system, and only an administrator can do them.

We can now safely disable login as the root user

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 of 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:

sudo usermod -p "!" root

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).

To logout, type logout or exit.

Your server is now all set up and ready for the course!

Remote access via SSH

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.

Note that:

  • This server is now running, and completely exposed to the whole of the Internet

  • You alone are responsible for managing it

  • You have just installed the latest updates, so it should be secure for now


r/linuxupskillchallenge • • Jan 06 '25

Day 0 - Get Your Own Server

45 Upvotes

INTRO

First, you need a server. You can't learn about administering a remote Linux server without having one of your own - so today we're going to get one - completely free!

Through the magic of Linux and virtualization, it's now possible to get a small Internet server setup almost instantly - and at a very low cost. Technically, what you'll be doing is creating and renting a VPS ("Virtual Private Server"). In a data center 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.

In addition to a hosting provider, we also need to choose which "flavor" 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.

Do you have a free server I can use?

Well, not quite yet.

SadServers has a beta scenario - "Resumable Server": Linux Upskill Challenge

This is a Debian 11 server without a challenge; it's for you to do as you please. Please be mindful that it still has some limitations (there's still no outgoing Internet access) and there can be some issues.

So, what are the options?

Check your options, see what fits you best. Take a minute to watch the video, it will answer most of your questions. When you have your server ready, you can start the challenge.

Day 1, here we go!


r/linuxupskillchallenge • • Oct 03 '21

Day 1 - Get to know your server

45 Upvotes

INTRO

You should now have a remote server setup running the latest Ubuntu Server LTS (Long Term Support) version. You alone will be administering it. To become a fully-rounded Linux server admin you should become comfortable working with different versions of Linux, but for now Ubuntu is a good choice.

Once you have reached a level of comfort at the command-line then you'll find your skills transfer not only to all the standard Linux variants, but also to Android, Apple's OSX, OpenBSD, Solaris and IBM AIX. Throughout the course you'll be working on Linux - but in fact most of what is covered is applicable to any system in the "UNIX family" - and the major differences between them are with their graphic user interfaces such as Gnome, Unity, KDE etc - none of which you’ll be using!

Although there is a "root" user, you will be logging in and working from the user account that you setup. Because this is a member of the group "sudo" it is able to run commands "as root" by preceding them with "sudo".

YOUR TASKS TODAY:

  • Connect and login remotely to your server

  • Run a few simple simple commands to check the status of your server

  • Change your password

INSTRUCTIONS

Remote access used to be done by the simple telnet protocol, but now the much more secure SSH (“Secure SHell) protocol is always used.

If you're using any Linux or Unix system, including Apple's MacOS, then you can simply open up a "terminal" session and use your command-line ssh client like this:

ssh user@<ip address>

For example:

ssh [email protected]

On Linux distributions with a menu you'll typically find the terminal under "Applications menu -> Accessories -> Terminal", "Applications menu -> System -> Terminal" or "Menu -> System -> Terminal Program (Konsole)"- or you can simply search for your terminal application. In many cases Ctrl+Alt+T will also bring up a terminal windows.

If you have configured the remote server with your SSH public key (see "Password-less SSH login" in the EXTENSION section of this post), then you'll need to point to the location of the private part as proof of identity with the "-i" switch, typically like this:

ssh -i ~/.ssh/id_rsa [email protected]

A very slick connection process can be setup with the .ssh/config feature - see the "SSH client configuration" link in the EXTENSION section below.

On an MacOS machine you'll normally access the command line via Terminal.app - it's in the Utilities sub-folder of Applications.

On recent Windows 10 versions, the same command-line client is now available, but must be enabled (via "Settings", "Apps", "Apps & features", "Manage optional features", "Add a feature", "OpenSSH client".

Alternatively, you can install the Windows Subsystem for Linux which gives you a full local command-line Linux environment, including an SSH client - ssh.

There are also GUI SSH clients for Windows (PuTTY, MobaXterm) and MacOS (Terminal.app, iTerm2).

Regardless of which client you use, the first time you connect to your server, you may receive a warning that you're connecting to a new server - and be asked if you wish to "cache the host key". Do this. Now, if you get a warning in future connections it means that either: (a) you are being fooled into connecting to a different machine or (b) someone may be trying a "man in the middle" attack.

So, now login to your server as your user - and remember that Linux is case-sensitive regarding user names, as well as passwords.

Once logged in, notice that the "command prompt” that you receive ends in $ - this is the convention for an ordinary user, whereas the "root" user with full administrative power has a # prompt.

Try these simple commands:

ls

uptime

free

df -h

uname -a

If you're using a password to login (rather than public key), then now is a good time to ensure that this is very strong and unique - i.e. At least 10 characters - because your server is fully exposed to bots that will be continuously attempting to break in. Use the passwd command to change your password. To do this, think of a new, secure password, then simply type passwd, press “Enter” and give your current password when prompted, then the new one you've chosen, confirm it - and then WRITE IT DOWN somewhere. In a production system of course, public keys and/or two factor authentication would be more appropriate.

It's very handy to be able to cut and paste text between your remote session and your local desktop, so spend some time getting confident with how to do this in your setup.

Log out by typing exit.

You'll be spending a lot of time in your SSH client, so it pays to spend some time customizing it. At the very least try "black on white" and "green on black" - and experiment with different monospaced fonts, ("Ubuntu Mono" is free to download, and very nice).

POSTING YOUR PROGRESS

Regularly posting your progress can be a helpful motivator. Feel free to post to the subreddit a small introduction of yourself, and your Linux background for your "classmates" - and notes on how each day has gone.

Of course, also drop in a note if you get stuck or spot errors in these notes.

WRAP

You now have the ability to login remotely to your own server. Perhaps you might now try logging in from home and work - even from your smartphone! - using an ssh client app such as "Termux". As a server admin you'll need to be comfortable logging in from all over. You can also potentially use JavaScript ssh clients (search for "consolefish"), or from a cybercafe - but these options involve putting more trust in third-parties than most sysadmins would be comfortable with when accessing production systems.

A NOTE ON "HARDENING"

Your server is protected by the fact that its security updates are up to date, and that you've set Long Strong Unique passwords - or are using public keys. While exposed to the world, and very likely under continuous attack, it should be perfectly secure. Next week we'll look at how we can view those attacks, but for now it's simply important to state that while it's OK to read up on "SSH hardening", things such as changing the default port and fail2ban are unnecessary and unhelpful when we're trying to learn - and you are perfectly safe without them.

EXTENSION

If this is all too easy, then spend some time reading up on:

RESOURCES

Copyright 2012-2021 @snori74 (Steve Brorens). Can be reused under the terms of the Creative Commons Attribution 4.0 International Licence (CC BY 4.0).