add ssh command support

This patch allows the execution of a predefined command instead of opening a shell. (ssh)
Acknowledging that we have not published any coding standards, please try to match the style of surrounding code. The closing brace of the "if" and the beginning of the "else" block should be on separate lines.