SSH

This is a README.adoc file. The original repository is located here.

Task SSH

Branch: ssh
Fenrir ID: ssh
Points: 45

Your solution must be located at ssh:

 ...
├─  ssh
│  ├─  setup.sh
│  ├─  part-1.sh
│  ├─  part-2.sh
│  └─  config
└─  .git

Set up a connection (15 points)

Create a script setup.sh which configures an ssh-connection using an ssh-key.

Server credentials:

url=server
user=fikus
password=breach

The host system has these commands & packages installed:

  • openssh-client

  • sshpass

To test the connection, create a script part-1.sh that executes a script named run.me located in ~/cacti on the server.

Questions

  • Which port does SSH use?

  • What does ssh-copy-id do?

  • What is the difference between dsa, rsa and ed25519?

  • How does key authentication work?

  • Read about the StrictHostKeyChecking option in ~/.ssh/config

  • What is sshpass?

Transferring files (15 points)

Do the previous part before!

The server’s credentials are the same. Create a script part-2.sh which:

  1. Copies the file ~/from/email.addr from the server. The destination path is ~/to/addr.email

  2. Copies the directory ~/from/emails.d to the server. The destination path is ~/to/addrs

Questions

  • What happens when you copy dir to server:new_name?

Config (15 points)

There are three servers (each responsible for its country’s domain):

  • deutschland

  • oesterreich

  • schweiz

Create a file config which configures the ssh client so that it redirects any domains from those countries to the correct server. E.g. gitlab.de must be forwarded to the deutschland server.

Each server has its own ssh keypair:

  • deutschland → allemand

  • oesterreich → autriche

  • schweiz → suisse

Questions

  • Which ssh key is chosen by default?

  • Read about the StrictHostKeyChecking option in ~/.ssh/config

  • What domains does each country have?

The project is licensed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

© 2026-present Iwan Kalinin <koefic.cien@gmail.com>