SSH API Implementation

This isn't yet rebased, nor is it mergeable, it's just up for review and comments.