Re: Connection has been unexpectedly closed. Server sent command exit status 0.
Enable password logging and make sure that the same password is used all the time.
session.AddRawConfiguration(@"Logging\LogSensitive", "1");