Added the logic for ussing ssh inception

Also, corrected several bugs related to the ssh.py and added a test
that uses such technology.