only set [ssh] section if installed

also resolve ImportError on connect