SSH Excercise 1

SSH is installed to /etc/ssh.

ssh_config is the configuration file of SSH. You are able to change the configuration of SSH by editing it. For example port number, protocol,
connection timeout etc.

I tried SSH by connecting to myy.haaga-helia.fi. By doing that, i was able to access my personal files on myy-server. Command for doing that was: “ssh <studentnumber>@myy.haaga-helia.fi”. I also connected from my virtual Linux Mint desktop to my Ubuntu server. Command for that was as simple as “ssh <servers ip address>” .


Homework 5


Commands for displaying current and available shells and chaning the shell.

Command for changing password. Your password can’t be too simple or short, or you are not able to change it.
Passwords can be found at /etc/ directory. They are stored encrypted in a file called shadow. Shadow file cannot be read unless sudo command is used.
You can change permissions of each file. As seen in the picture, two of the files have different permissions. Only user may read and write the file salainen. User, group and other can read and write the file julkinen. Changing permissions of files are done by using command “chmod”. Commands for chaning permissions so only user can read and write, would be “chmod 600 salainen”.

Homework 4 command prompt II

Terminal excercise

  1. Make yourself a list of most common commands.
  2. Which command lists files in directory /usr/bin?
  3. Previous command prints a long list. How can you browse the list?
  4. a. Which one command moves you to /usr/lib? b. Which one command moves you back to your home directory?
  5. Which command searches the whole computer for file syslog?
  6. How can you get help in using command grep?
  7. Copy file /etc/popularity-contest.conf to your home directory without typing the whole file name (use auto completion).
  8. What is your home directory?
  9. Copy /etc/services to your home directory
  10. Copy directory /etc/X11 to your home directory. (Whole directory with contents)
  11. Find commands that list devices (block, USB, …).

  • —–Common and useful commands——
  • ls
  • cat
  • cd
  • pwd
  • mkdir
  • touch
  • chmod
  • more
  • less
  • man
  • apropos
  • apt-get
  • find

2. Answer: Depends on your location. If you are in root then: “ls -la usr/bin/”

3. Answer: You can browse the list using “more” or “less” command. For example: “ls -la usr/bin/ | more”

4. Answer: a) “cd usr/lib/” b) “cd ../../home/arttu/” or “cd ~”

5. Answer: “sudo find -name ‘syslog’ “

6. Answer: “man grep” or “info grep”

7. Answer: “cp /etc/pop [tab] /home/arttu

8. Answer: /home/arttu

9. Answer: “cp /etc/services /home/arttu”

10. Answer: “cp -r /etc/X11 /home/arttu

11. Answer: “apropos devices” display several commands that show information about devices. I tried “lshw” which lists systems hardware, “lsblk” which lists info about blocks and “lsusb” which shows info about USB devices.

Linux palvelimet, kotitehtävä 2

  • 1. Asensin virtuaalikoneessani pyörivään Ubuntuun GIMP:in sekä Brave -selaimen. Brave selaimessa on valmiina mainoksien sekä seurannan esto. GIMP on avoimeen lähdekoodiin perustuva kuvankäsittelyohjelma.
  • 1.1 GIMP käyttää GPL lisenssiä, joten sitä saa vapaasti levittää jopa kaupallisessa tarkoituksessa. Brave -selain ei käytä GPL:ää, ja sen käyttöoikeudet ovat tiukemmat. 2

2. Lista muutamista kaupallisista ohjelmistoista joita käytän windowsilla:

Microsoft office

Adobe photoshop

F-secure antivirus

Yllä mainituille ohjelmistoille löytyy myös Linuxista samankaltaisia avoimeen lähdekoodiin perustuvia ohjelmistoja. Officelle korvikkeena toimii libre office, joka on monipuolinen toimistotyökalu. Photoshopille taas GIMP, ja F-securelle ClamAV -virustentorjuntaohjelmisto, vaikka linuxissa toimivia haittaohjelmia on tavattu hyvin vähän.