checksum on server with ftp
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 12
- Joined: 2012-05-17, 08:07 UTC
- Location: Noumea, New Caledonia
- Contact:
checksum on server with ftp
Is it possible for Total Commander to get a checksum for a file on a server via ftp?
I tried but got a message "not supported"
I wondered if the new version 8 could do it.
I tried but got a message "not supported"
I wondered if the new version 8 could do it.
richardhcoctopus
It is impossible to count checksums without reading the whole contents of a file. Therefore it requires either downloading the file and counting its checksum locally, or making the server count the file checksum for you. So there is nothing TC is able or will be able to do.
If your server supports corresponding commands (like XMD5 or XSHA1) you can send them from TC command line and see the results. If not — there is no other way but to download the file and calculate its checksum locally, as usual.
It is impossible to count checksums without reading the whole contents of a file. Therefore it requires either downloading the file and counting its checksum locally, or making the server count the file checksum for you. So there is nothing TC is able or will be able to do.
If your server supports corresponding commands (like XMD5 or XSHA1) you can send them from TC command line and see the results. If not — there is no other way but to download the file and calculate its checksum locally, as usual.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
- ghisler(Author)
- Site Admin
- Posts: 50934
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC 7.5x supports XMD5 and XSHA1 when using "synchronize dirs", but only if the server reports to support these commands. They are used to compare local and remote files. TC doesn't show them (except in log), but uses them to show whether a local and a remote file are the same or not.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Don't forget XCRC, the most often available of them all.
Simply check the beginning of ftp log and look at the FEAT command reply. If any of XCRC, XMD5, XSHA1 or HASH is listed, it's possible to use them to get checksums from server. You just have to manually send them to server, TC won't currently help you with that outside of Synchronize Dirs. On the other hand, it's not too hard, just type the command and Ctrl+Enter on selected file will put the whole name to command line, so it's usable if you don't need to do it too often.
Perhaps future TC could be extended so that Create Checksum File(s) command would work also for FTP (if supported by server). Probably a little differently, e.g. just show the result(s) in the same window as the result of manual command. Not perfect, but still much better than "Function not supported!" message box.
Simply check the beginning of ftp log and look at the FEAT command reply. If any of XCRC, XMD5, XSHA1 or HASH is listed, it's possible to use them to get checksums from server. You just have to manually send them to server, TC won't currently help you with that outside of Synchronize Dirs. On the other hand, it's not too hard, just type the command and Ctrl+Enter on selected file will put the whole name to command line, so it's usable if you don't need to do it too often.
Perhaps future TC could be extended so that Create Checksum File(s) command would work also for FTP (if supported by server). Probably a little differently, e.g. just show the result(s) in the same window as the result of manual command. Not perfect, but still much better than "Function not supported!" message box.
-
- Junior Member
- Posts: 12
- Joined: 2012-05-17, 08:07 UTC
- Location: Noumea, New Caledonia
- Contact:
I was able to get the checksum from the server using pUTTY and the command md5sum
This only works when connected with SFTP
I have some large (500MB+) programs that I sell online in a protected folder that has a total of about 1200 files and the folder is not duplicated on my local computer so I using Synchronize Dirs is not very satisfactory to just check and see if a big file I uploaded actually got there OK.
I'll try the command line - If I understand correctly the command line is kind of like using Telnet to send a command.
This only works when connected with SFTP
I have some large (500MB+) programs that I sell online in a protected folder that has a total of about 1200 files and the folder is not duplicated on my local computer so I using Synchronize Dirs is not very satisfactory to just check and see if a big file I uploaded actually got there OK.
I'll try the command line - If I understand correctly the command line is kind of like using Telnet to send a command.
richardhcoctopus,

HTH
Roman
Not really. The command line just lets you send commands to the FTP server. In turn, the FTP server may understand the "SITE <command>" command and thus be instructed to run this command. Have fun exploring!I'll try the command line - If I understand correctly the command line is kind of like using Telnet to send a command.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
-
- Junior Member
- Posts: 12
- Joined: 2012-05-17, 08:07 UTC
- Location: Noumea, New Caledonia
- Contact:
I ran into a problem when trying to connect with SFTP
After connecting I get:
Get directory
TYPE A
200 TYPE is now ASCII
PORT XXXXXXXXXXXX
500 I won't open a connection to XXXXXXXXXX (only to YYYYYYYYYYY) -( had to change this to X and Y as the post was not allowed)
Any idea what the problem with the connection is?
Also I don't see any of the XCRC, XMD5, HASH listed after
FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
AUTH TLS
PBSZ
PROT
ESTA
PASV
EPSV
SPSV
ESTP
211 End.
HELP SITE
214-The following SITE commands are recognized
ALIAS
CHMOD
IDLE
UTIME
214 Pure-FTPd -
PBSZ 0
200 PBSZ=0
PROT P
200 Data protection level set to "private"
OPTS UTF8 ON
504 Unknown command
CWD /public_html
250 OK. Current directory is /public_html
Connect ok!
PWD
257 "/public_html" is your current location
Get directory
TYPE A
200 TYPE is now ASCII
PORT XXXXXXXXXX
500 I won't open a connection to
After connecting I get:
Get directory
TYPE A
200 TYPE is now ASCII
PORT XXXXXXXXXXXX
500 I won't open a connection to XXXXXXXXXX (only to YYYYYYYYYYY) -( had to change this to X and Y as the post was not allowed)
Any idea what the problem with the connection is?
Also I don't see any of the XCRC, XMD5, HASH listed after
FEAT
211-Extensions supported:
EPRT
IDLE
MDTM
SIZE
REST STREAM
MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
MLSD
AUTH TLS
PBSZ
PROT
ESTA
PASV
EPSV
SPSV
ESTP
211 End.
HELP SITE
214-The following SITE commands are recognized
ALIAS
CHMOD
IDLE
UTIME
214 Pure-FTPd -
PBSZ 0
200 PBSZ=0
PROT P
200 Data protection level set to "private"
OPTS UTF8 ON
504 Unknown command
CWD /public_html
250 OK. Current directory is /public_html
Connect ok!
PWD
257 "/public_html" is your current location
Get directory
TYPE A
200 TYPE is now ASCII
PORT XXXXXXXXXX
500 I won't open a connection to
SFTP is what you might use with PuTTY, following log is either FTP or FTPS (FTP with SSL). Anyway, this one is easy to solve, just enable passive mode in connection properties.richardhcoctopus wrote:I ran into a problem when trying to connect with SFTP
That's bad news for you, this server does not support remote checksums.Also I don't see any of the XCRC, XMD5, HASH listed after FEAT
-
- Junior Member
- Posts: 12
- Joined: 2012-05-17, 08:07 UTC
- Location: Noumea, New Caledonia
- Contact:
You can also use SFTP plugin for TC. No huge advantages compared to PuTTY (I mean for working with checksums), it's basically the same, you'd just run md5sum from TC's command line. So just another option, but it's possible that you could like something about it better.
-
- Junior Member
- Posts: 12
- Joined: 2012-05-17, 08:07 UTC
- Location: Noumea, New Caledonia
- Contact:
I did install SFTP plugin - but when I connect using SSL/TLS checked - and use passive mode checked - I still get that same error message after I connect and it enters passive mode -
227 Entering Passive Mode (69,195,83,119,21,254)
PORT 192,168,1,101,213,129
500 I won't open a connection to 192.168.1.101 (only to 101.101.12.246)
This does not happen with a normal FTP connection. Not sure what is wrong. But I don't think I can use the command line on TC unless I connect with SSL/TLS.
227 Entering Passive Mode (69,195,83,119,21,254)
PORT 192,168,1,101,213,129
500 I won't open a connection to 192.168.1.101 (only to 101.101.12.246)
This does not happen with a normal FTP connection. Not sure what is wrong. But I don't think I can use the command line on TC unless I connect with SSL/TLS.
richardhcoctopus
What you try to do is install the plugin and continue to connect via FTPS completely ignoring the plugin. SFTP is an SSH connection and has nothing to do with usual FTP protocol, while FTPS is normal FTP wrapped into SSL/TLS.
To use the installed SFTP plugin, do not press Ctrl+F: plugins cannot integrate into this window! You need to go to Network Neighborhood and open Secure FTP folder there. But for SFTP to work, the server must allow incoming SSH connections.
What you try to do is install the plugin and continue to connect via FTPS completely ignoring the plugin. SFTP is an SSH connection and has nothing to do with usual FTP protocol, while FTPS is normal FTP wrapped into SSL/TLS.
To use the installed SFTP plugin, do not press Ctrl+F: plugins cannot integrate into this window! You need to go to Network Neighborhood and open Secure FTP folder there. But for SFTP to work, the server must allow incoming SSH connections.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
With SSL/TLS checked or not, it's still FTP, it does not change available commands (*1). It only enables or disables encrypted connections.
If TC is configured to use passive mode, sends PASV command to server and gets correct reply, but then falls back to active mode (PORT command), it means that it can't establish data connection to server. If it happens only with SSL but works correctly without it, then it looks like server relies on packet inspection to open data ports, which can't work with encrypted connections. In other words, server might be a little misconfigured.
But as Flint wrote, SFTP is something completely different. So try that.
--
(*1) In theory it could, but it's very unlikely.
If TC is configured to use passive mode, sends PASV command to server and gets correct reply, but then falls back to active mode (PORT command), it means that it can't establish data connection to server. If it happens only with SSL but works correctly without it, then it looks like server relies on packet inspection to open data ports, which can't work with encrypted connections. In other words, server might be a little misconfigured.
But as Flint wrote, SFTP is something completely different. So try that.
--
(*1) In theory it could, but it's very unlikely.
-
- Junior Member
- Posts: 12
- Joined: 2012-05-17, 08:07 UTC
- Location: Noumea, New Caledonia
- Contact:
OK, it connects fine from network using the Secure FTP
But after navigating to the folder I selected the file and tried md5sum from the command line - that did generate a hash but it wan't the right one and when I tried another file I got the same hash.
So I put md5sum Filename.exe in the command line - this time it waited about the right amount of time to generate a hash but it just came up with
quote md5sum filename.exe
That's it.
It works OK with PuTTY and comes up with the correct hash.
But after navigating to the folder I selected the file and tried md5sum from the command line - that did generate a hash but it wan't the right one and when I tried another file I got the same hash.
So I put md5sum Filename.exe in the command line - this time it waited about the right amount of time to generate a hash but it just came up with
quote md5sum filename.exe
That's it.
It works OK with PuTTY and comes up with the correct hash.
When you run a command from command line, it's sent to the server and executed there. How in the world is the server supposed to know what you selected in your TC on your client machine?richardhcoctopus wrote:But after navigating to the folder I selected the file and tried md5sum from the command line - that did generate a hash but it wan't the right one and when I tried another file I got the same hash.

Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64