Lab #4 Steps (SYS265) - wAlber47/Tech-Journal GitHub Wiki

  1. Install Git on docker01, web01, and mgmt01. Use this link for help.

docker01

  1. Clone the GitHub repository.
  2. Inside of the repository create a directory structure:
    1. Add sys265 as the root.
    2. Inside of sys265:
      1. touch 50-cloud-init.yaml
      2. touch cloud.cfg
      3. touch docker-compose.yml
      4. touch docker.txt
      5. mkdir hosts
  3. Commit and push the changes to your repository:
    1. git add all the files
    2. git commit -m "<description of changes>"
    3. git push -u origin master
    4. Confirm folders are available to view online.

mgmt01

  1. Clone the GitHub repository.
  2. Add a new folder inside of sys265 titled mgmt01.
  3. Create a README.md with the hostname in it.
  4. Add files, commit, and push the changes to GitHub.
  5. Back on docker01, pull the changes.

web01

  1. Clone the GitHub repository.
  2. Inside of sys265, create a new folder structure:
    1. mkdir -p linux/{public-keys,centos7}
    2. cd linux/
    3. ls to confirm folders created properly.
    4. Create a file with this titled centos7/secure-ssh.sh.
    5. chmod +x centos7/secure-ssh.sh
    6. cat centos7/secure-ssh.sh to confirm.

Creating an RSA Keypair

  1. ssh-keygen -t rsa -C "sys265"
    1. Leave all the options blank.
  2. cp ~/.ssh/id_rsa.pub . while you're in sys265/public-keys.

Hardening Script

You are going to need to figure out how to create a user that can only login via an RSA private key using a script.