Closes #1: Create main() method.

For readability, the ssh functionality was put into ssh_main() while the
local mode was put into local_main().