Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.19 KB

NOTES.md

File metadata and controls

31 lines (22 loc) · 1.19 KB

Notes

Check a student's cloud server

This requires netcat to be installed locally and on the server. Install it with brew install netcat on macOS with Homebrew.

The script below will copy the scripts/listen-server-ports.sh script to the student's server and run it. That script runs a netcat process on each of the 4 ports that are supposed to be open. Those processes echo OK once as soon as a client connects.

Local netcat commands are then run to connect to each port and verify that the OK is received. This shows that the firewall was correctly configured to open these ports.

The listen-server-ports.sh script is then killed and deleted from the server.

The contents of all /home/*/.ssh directories is listed to check that the student has correctly created their own user, and that all SSH directory/file permissions are correct for the ubuntu user and the student's user.

The hostname and the contents of the /etc/hostname files are also displayed for validation.

$> ./scripts/check-student-server.sh 1.2.3.4 admin_user

Note: each nc command must be stopped by typing Ctrl-C once after the OK received from the server is displayed.