Fix authentication for remote hosts