Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 2.08 KB

SETUP.md

File metadata and controls

69 lines (49 loc) · 2.08 KB

Setup

Initial setup

  • Put a random secret in secret.txt.

  • Download CSV student data to students.csv.

  • Check CSV encoding with file -I students.csv.

  • If necessary, convert it to UTF-8:

    mv students.csv original.csv
    iconv -f macintosh -t UTF-8 < original.csv > students.csv
  • Make sure number and content of columns are as expected in scripts/utils.js. Update the scripts and/or the CSV file if necessary.

  • Run npm run setup.

Set up a virtual machine for SSH exercises

ansible-playbook -i ssh-vm/inventory -vv -D ssh-vm/playbook.yml

Send credentials to students

npm run mails

Enable/disable password authentication

# Enable
ansible-playbook -i ssh-vm/inventory -vv -D -t ssh -e ssh_password_authentication=true ssh-vm/playbook.yml

# Disable
ansible-playbook -i ssh-vm/inventory -vv -D -t ssh -e ssh_password_authentication=false ssh-vm/playbook.yml

List a server's SSH key fingerprints

$> find /etc/ssh -name "*.pub" -exec ssh-keygen -l -f {} \;

Renegerate SSH host keys

ansible-playbook -i ssh-vm/inventory -vv -D -t ssh -e ssh_regenerate_host_keys=true ssh-vm/playbook.yml

Configure Azure virtual machines for students

  • npm run azure:inventory
  • ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook -vv -D -i azure/inventory azure/playbook.yml