+1 Marcus ... true story follows ...
A liberally minded tech director of a small school whose students were generally well behaved (offline and on), setup a Linux server to allow students to learn how to do web pages. Students had their own home directory and a public_html directory for publishing their DreamWeaver/other web creations.
Within a month of helping set that up, server out of space ... why? One student was really interested in cars ... all makes, models, years, etc. Spent a lot of time but managed to find the 'mother loads' of car pics ... ford, chevy, etc, and downloaded them to that server. Nothing really malicious ... just resulted in an un-intended consequence of no quota's (duh!).
Now as to a script for ssh and moodle ... best, me thinks, if it could be restricted to the admin/server folks. Advantage in admin of a moodle then ... git acquired code, git maintained moodle + ability to make site backups + take advantage of the cli scripts that do exist in moodle code.
Anyhoo, my 2 cents!
'SoS', Ken