I've set up a virtual ubuntu 32bit machine with openssh. I expire my test user's password with the command:
Can someone help me figure out what's going on? My connection code is below:
sudo passwd -e sftptest
However, when I make a connection, it correctly connects and disconnects. If I use putty to connect, I am prompted to change my password.Can someone help me figure out what's going on? My connection code is below:
PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo(
settings.Hostname,
(int)settings.PortNumber,
settings.Username,
"sftptest"
);
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();
}