Added logic to only include hostname when using SSH