Hi,
Sorry for late response.
The reason SSH_MSG_USERAUTH_PASSWD_CHANGEREQ needs to be sent its because it detects that username password needs to be changed.
I am no sure how and why FileZilla works, may be internally it changes password to itself again or uses some other trick, o might have a bug.
See if you can handle PasswordExpired event. This event is raised when you need to provide a new password.
Here is an example of how you would do it:
Thanks,
Oleg
Sorry for late response.
The reason SSH_MSG_USERAUTH_PASSWD_CHANGEREQ needs to be sent its because it detects that username password needs to be changed.
I am no sure how and why FileZilla works, may be internally it changes password to itself again or uses some other trick, o might have a bug.
See if you can handle PasswordExpired event. This event is raised when you need to provide a new password.
Here is an example of how you would do it:
var connectionInfo = new PasswordConnectionInfo("host", "username", "password");
var encoding = new Renci.SshNet.Common.ASCIIEncoding();
connectionInfo.PasswordExpired += delegate(object sender, AuthenticationPasswordChangeEventArgs e)
{
e.NewPassword = encoding.GetBytes("123456");
};
using (var client = new SshClient(connectionInfo))
{
client.Connect();
client.Disconnect();
}
Hope it helps.Thanks,
Oleg