Homework 3.#

SSH service on master and n01#

Make SSH service working on both master and n01:#

Remove the SSH password authentication restriction configuration file:

rm /etc/ssh/sshd_config.d/60-cloudimg-settings.conf

Generate host keys:

ssh-keygen -A

Restart SSH service:

systemctl restart sshd

Using SSH, scp and rsync#

  • Set private/public SSH key authentication for user edward to SSH between master and n01.

  • Have user edward to download deb package vim.

Extract the deb file content into new directory VIM.

  • By using recursive scp, copy subdirectory doc from VIM/usr/share to the home directory of user hostadm on rocky10-1.

  • By using rsync, copy the subdirectory doc to /tmp directory on rocky10-1.

Create a user account with specified uid, gid, and home directory.#

  • Create user account edward with uid=gid=1666 and home directory in /NFS/home/edward on rocky10-1 VM.

Configure autofs on rocky10-1 VM.#

  • Set automount for /NFS/home on rocky10-1 VM by creating files auto.master and auto.exports in directory /etc.

  • ssh to rocky10-1 VM from the desktop as user edward. Check if /NFS/home gets automounted.