Lab #4 Steps (SYS265) - wAlber47/Tech-Journal GitHub Wiki
- Install Git on docker01, web01, and mgmt01. Use this link for help.
docker01
- Clone the GitHub repository.
- Inside of the repository create a directory structure:
- Add
sys265
as the root. - Inside of
sys265
:touch 50-cloud-init.yaml
touch cloud.cfg
touch docker-compose.yml
touch docker.txt
mkdir hosts
- Add
- Commit and push the changes to your repository:
git add
all the filesgit commit -m "<description of changes>"
git push -u origin master
- Confirm folders are available to view online.
mgmt01
- Clone the GitHub repository.
- Add a new folder inside of sys265 titled
mgmt01
. - Create a
README.md
with the hostname in it. - Add files, commit, and push the changes to GitHub.
- Back on docker01, pull the changes.
web01
- Clone the GitHub repository.
- Inside of sys265, create a new folder structure:
mkdir -p linux/{public-keys,centos7}
cd linux/
ls
to confirm folders created properly.- Create a file with this titled
centos7/secure-ssh.sh
. chmod +x centos7/secure-ssh.sh
cat centos7/secure-ssh.sh
to confirm.
Creating an RSA Keypair
ssh-keygen -t rsa -C "sys265"
- Leave all the options blank.
cp ~/.ssh/id_rsa.pub .
while you're insys265/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.