I did this exercise with:

HP Pavilion 15-aw022no

AMD A9-9410 (2.9GHz, 2 Cores)

8GB DDR4-SDRAM 2133MHz (2 x 4)


AMD Radeon R7 M440 (2GB, GDDR3)

Ubuntu 17.10 (Live USB)

Instructions for exercises from:

 a) Install SSH-daemon

Command: sudo apt-get update && sudo apt-get install ssh -y

b)Protect your PC with firewall but make a hole for SSH first.

Command for SSH hole: sudo ufw allow 22/tcp

Command for setting up the firewall: sudo ufw enable

When working with remote computers with SSH, remember to allow SSH first so you do not lock yourself out.

c) Transfer files on SSH

I made a text file called a.txt for this exercise to /home/matias folder. With command
scp -r /home/xubuntu/a.txt matias@  I copied the file to my VPS. Just needed to confirm fingerprint with yes and give password to VPS.

100% of 26 bytes transfered with speed 0.6kb/s and in 00:00 time. Success.

d) Automate login with public key method

I found very comprehensive instructions from:

First I created SSH key pair on my local PC for user authentication with command ssh-keygen. This generates public and private keys with rsa algorithm. Next I needed to choose file in which to save the key, I chose the default folder and file. Lastly I gave a passphrase for encrypting the key. Image below is from SSH’s homepage, and it’s demonstrating the key creating process.


Once key is created, I needed to copy it to a server. I used my VPS. On my local PC I gave command ssh-copy-id -i /home/xubuntu/.ssh/ matias@ This command copies file which is where the key is from path /home/xubuntu/.ssh to my virtual private server user matias in address

To test if this is successfully accomplished I logged to my server via SSH      ssh matias@ Now it asked passphrase which I created earlier.


I typed it and clicked Unlock. I successfully logged in to my VPS.


j) Install, configure and start Sysstat. Investigate load history and analyze the results.



This is done on virtual private server (Ubuntu 16.04)

Installed Sysstat with command sudo apt-get install sysstat -y. Then I edited sysstat configuration with command sudoedit /etc/default/sysstat from ENABLE=”false” to ENABLE=”true”.


Then I launched it with command sudo systemctl start sysstat and checked that it is functioning with command sar.


Now Sysstat is demonstrably started. I will come back to this later, when there’s something to analyze.



Following results with command iostat.


Linux 4.4.0-112-generic = System’s kernel version

(kurkku) = Computer’s hostname

02/27/18 = Date when the data was collected

_x86_64_ = Architecture of the system

(1 CPU) = How many CPUs available on system

%user 0.15 = User’s application level utilization of CPU in percentage

%nice 0.01 = User level with nice priority utilization of CPU in percentage

%system 0.11 = System’s kernel level utilization of CPU in percentage

%iowait 0.02 = Time when CPU is waiting an outstanding disk I/O request in percentage

%steal 0.08 = Involuntary time virtual CPU is waiting the hypervisor is servicing another virtual processor in percentage

%idle 99.63 = Time CPU is idling in percentage

Device = This column gives the device name as listed in the /dev directory

tps 0.57 = Number of transfers per second that were issued to the device

kB_read/s 0.51 = Amount of data read from the device in kilobytes per second

kB_wrtn/s 7.56 = Amount of data written from the device in kilobytes per second

kB_read 943486 = Total number of kilobytes read

kB_wrtn 14001209 = Total number of kilobytes written

I think we can draw a conclusion that CPU is in not in hard usage.

Sources for explanations:

Leave a Reply

Your email address will not be published.