Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Perform this lab only if you have fully performed the earlier lab ( part 1 ) : Server authentication using SSH keys PART 1 Multi

Perform this lab only if you have fully performed the earlier lab (part 1): Server authentication using SSH keys PART 1
Multi-server backups. Write a program (in bash, .sh) that does the following:
create a script named '
backupNode.sh'- a plain text file (use the nano editor)
the program should read from an external text configuration file called 'backupNode.conf' a list of directories that should be backed up (each directory on a separate line)
The script should perform a backup of the directories indicated in the configuration file using the packaging tool (tar + ziping) in such a way that the resulting archive file, which will contain all directories indicated in the configuration file, will have a name consisting of the name of the server from which the backup comes from and the date and time the backup was created (i.e. the resulting file will be named: wenus_2022_03_01_10_00.tgz, the host name can be called with the command: hostname)
After the backup is done, the script will send the resulting file to the backup server (using the secure ssh protocol). The script will not stop when prompted for a password if keys with an empty password are matched between servers. For this purpose:
On the backup server create user: "forbackups"
for this user (forbackups) generate a pair of ssh keys (pub and priv)
Pass the pub key to the 'authorized_keys' container of the server on which the backup will be stored
Copying to the account of a specific user (and ssh connections) is carried out using the command with an indication, e.g.
Scp file.tgz
forbackups@172.16.0.5:
(the colon after the IP address is valid, without it, scp copying will not be possible)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions