added checks for checking ssh and sudo access