New SFTP plugin available now
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50400
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Please put all the DLLs from the libcurl archive to the TC directory. You probably forgot the zlib1.dll. Newer ssh versions depend on it.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
This ones are not working for me too!7.28.1 Win64 versions
I have got a working set with:
TC 32-bit (TOTALCMD.EXE) using DLLs of curl-7.28.1-devel-mingw32.zip at <TC installdir> directory
TC 64-bit (TOTALCMD64.EXE) using DLLs of curl-7.27.0-devel-mingw64.7z at <TC installdir>\64 directory
#5767 Personal license
-
- Junior Member
- Posts: 2
- Joined: 2013-02-12, 15:44 UTC
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
-
- Junior Member
- Posts: 2
- Joined: 2013-02-12, 15:44 UTC
[SFTP plugin] remind password expired
I often connect to a sftp server which ask user change their password every 90 days.
When my password expired, the progress bar of SFTP plugin will go to 90%, back to 80% then repeat. I do not what happened, until connect using another ssh program to verify it...
Here is the data that I connect using another ssh program.
It would be helpful when password expired or account is locked...
When my password expired, the progress bar of SFTP plugin will go to 90%, back to 80% then repeat. I do not what happened, until connect using another ssh program to verify it...
Here is the data that I connect using another ssh program.
Could SFTP plugin popup the message WARNING: Your password has expired?login as: xyz
xyz@?.?.?.?'s password: ********
[files]: 3004-332 Your password has expired.
Last unsuccessful login: Thu Sep 27 10:56:56 TAIST 2012 on ssh from ?.?.?.?
Last login: Mon Feb 4 11:11:32 TAIST 2013 on /dev/pts/1 from ?.?.?.?
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for "xyz"
xyz's Old password:
xyz's New password:
Enter the new password again:
xyz@sserver:/home/xyz>
It would be helpful when password expired or account is locked...
- ghisler(Author)
- Site Admin
- Posts: 50400
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately I don't think that this is possible with OpenSSH.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
It is possible, see the last parameter: http://www.libssh2.org/libssh2_userauth_password_ex.html
- ghisler(Author)
- Site Admin
- Posts: 50400
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks for the info about libssh2_userauth_password_ex - I wasn't aware of this function, I was using libssh2_userauth_password. The problem is how to test this without a server which requests a password change. Would anyone be interested in a test version?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50400
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, I have tried to implement it now, but it doesn't work. When I use SSH, I get this:
However, when I try to connect with my SFTP plugin and call the function
libssh2_userauth_password_ex
it returns with error 0 (success) without calling the callback function. When I then try to create an SFTP connection with libssh2_sftp_init, the function hangs forever with error "would block". Any ideas?
Edit: A new version of the SFTP plugin is available now on http://www.ghisler.com/plugins.htm . Changes:
1. It works now with the current version of the openssh dlls from libcurl. The problem was that the zip dll was renamed from zlibwapi.dll to zlib1.dll
2. Changing the password works when the server supports "keyboard interactive" authentication method, but NOT password authentication
3. The code changing the password with password authentication has been added, but as described above, the callback is never called.
Code: Select all
ssh localhost -l testuser
testuser@localhost's password:
You are required to change your password immediately (password aged)
Welcome to Linux Mint 12 Lisa (GNU/Linux 3.0.0-15-generic i686)
Welcome to Linux Mint
* Documentation: http://www.linuxmint.com
WARNING: Your password has expired.
You must change your password now and login again!
Changing password for testuser.
(current) UNIX password:
libssh2_userauth_password_ex
it returns with error 0 (success) without calling the callback function. When I then try to create an SFTP connection with libssh2_sftp_init, the function hangs forever with error "would block". Any ideas?
Edit: A new version of the SFTP plugin is available now on http://www.ghisler.com/plugins.htm . Changes:
1. It works now with the current version of the openssh dlls from libcurl. The problem was that the zip dll was renamed from zlibwapi.dll to zlib1.dll
2. Changing the password works when the server supports "keyboard interactive" authentication method, but NOT password authentication
3. The code changing the password with password authentication has been added, but as described above, the callback is never called.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
You're right, it does not work.
In fact, it does not work with PuTTY either, even though it gives you an option (well, forces you) to change the password. Those prompts don't come from PuTTY nor OpenSSH server. PuTTY does support the required mechanism (SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message in SSH protocol), but OpenSSH looks like it doesn't. There's something in the source, but it seem to be for client part only.
But some other servers should support it: http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/ssh2-password-expiry.html
In fact, it does not work with PuTTY either, even though it gives you an option (well, forces you) to change the password. Those prompts don't come from PuTTY nor OpenSSH server. PuTTY does support the required mechanism (SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message in SSH protocol), but OpenSSH looks like it doesn't. There's something in the source, but it seem to be for client part only.
But some other servers should support it: http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/ssh2-password-expiry.html
I tried trial version of VShell Server and after one small fix it works great. Too bad it's mostly wasted work, because most commonly used OpenSSH does not support it. :(
Code: Select all
--- sftpplug_src14-clean\sftpfunc.cpp 2013-02-22 12:14:16.000000000 +0100
+++ sftpplug_src14\sftpfunc.cpp 2013-02-23 17:06:45.110054900 +0100
@@ -542,8 +542,9 @@
LoadStr(buf1,IDS_PASS_CHANGE_REQUEST);
newpass[0]=0;
if (RequestProc(PluginNumber,RT_Password,title,buf1,newpass,sizeof(newpass)-1)) {
- *newpw=newpass;
*newpw_len=(int)strlen(newpass);
+ *newpw = (char *)malloc(*newpw_len);
+ strlcpy(*newpw, newpass, *newpw_len);
if (PassConnectSettings) {
strlcpy(PassConnectSettings->password,newpass,sizeof(PassConnectSettings->password)-1);
switch (PassConnectSettings->passSaveMode) {
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
Nevertheless I can confirm the fix is working even on 64-bit now1. It works now with the current version of the openssh dlls from libcurl.

I have got a working set with:
SFTP plugin 1.4
TC 32-bit (TOTALCMD.EXE) using DLLs of curl-7.29.0-devel-mingw32.zip at <TC installdir> directory
TC 64-bit (TOTALCMD64.EXE) using DLLs of curl-7.29.0-devel-mingw64.7z at <TC installdir>\x64 directory
Thanks a lot !
#5767 Personal license