Thumbnail image

Linux Upskill Challenge: Day 1

!
Warning: This post is over 365 days old. The information may be out of date.

Table of Contents

this blog is part of the linux upskill challenge series. contains notes of my learning process in following the [linux upskill challenge] guide(https://github.com/livialima/linuxupskillchallenge)

the other day you have successfully created a server. You yourself will manage the server, of course. to become a linux server admin, we are required to be comfortable working with various linux variants. but for now ubuntu is the best choice.

Today’s Task

  • connect and log in remotely to the server
  • run some simple commands, to check server status

Connect Server

yesterday we tried to connect to the server using ssh using a private key. in yesterday’s discussion on day 0 I used the configuration file to connect now I will try to connect without a config file or manually.

previously we have created a key pair using ssh keygen into the .ssh directory with the name ed25519 the following command will give us access to alibaba cloud ecs (elastic compute service) server.

ssh -i path/to/key_file <username>@<remote_host>

flag -i atau kepanjangan dari --identity_file tempat kita menginput jalur ke file private key kita.

why do we use the config file instead of the way above? so that it doesn’t waste time and of course it’s easier to manage everything hosts (if we have many) into the file.

in our windows version 10 and below we can use putty a gui-based application which is of course user friendly to access ssh. and for versions above you can use windows subsystem linux which supports most linux command line environments.

let’s enter the server, watch the video below

I use the ssh command with the hostname ecs based on the contents of the configuration. seen when we enter the server, the username is ech-user with the hostname sarvis

Run Basic Commands

ls

Used to view a list of files and directories. see manpage man ls

If the ls command returns nothing, it means you don’t have any directories or files. to prepare the contents of the home directory you need to install xdg-user-dirs and run the command xdg-user-dirs-update. later you will have a default unix directory such as desktop, images, documents and so on.

uptime

tells you how long the machine/server has been running and other information. see man uptime

free

displays the amount of free and used memory in the system. see man free

df

gives a big picture of the used file system disk space

uname

displays information about the server and its operating system

the above command is sufficient to know the big picture of system information.

wait.. then how to log out?

calm down we just need to press ctrl + d or by typing exit

Wrap

You are now able to login remotely to your server. maybe you are also interested in opening it on your smartphone, with termux for example. however most sysadmins prefer to access it via the production system.

Oh.. Here you are, thanks for reading.


Posts in this series

Related Posts