Added support for non-root SSH user, better handling of remote master query