Main code

It's by no means perfect, and it requires the Perl ssh module.