CrushMFT Documentation

Diagnosing an SFTP connection#

When a connection to another SFTP server fails with a message about the MAC, the key exchange or "Failed to negotiate algorithms", Diagnose shows how far the connection gets, who the other server is, what both sides offer, and what to change. It connects the way the item does, by the same route, and stops before it logs in: no password and no key are sent.

Where it is#

Where How
SFTP items in the User Manager Diagnose, beside Test in VFS Item Properties, for an SFTP item. It checks the item as it stands in the dialog, saved or not. When Test of an SFTP item fails, a notice points to it.
Jobs a server path that is an sftp:// address has a Diagnose button (the wrench) beside Test. It uses the task's connection settings.

Diagnose beside Test in the VFS Item Properties of an SFTP item

What it checks#

The panel shows each step with a mark: done, a warning, failed, or not reached. Details under a step shows what is behind it.

Diagnose of an item whose key exchange fails: Reach, Header and Offer done, Connect failed

Step What it does What it can tell you
Reach connects to the address, by the item's route: directly, through the DMZ or through a proxy. Directly, a name with several addresses is tried address by address until one answers. the name does not resolve on this server; the connection is refused (nothing listens, or a firewall says no); it times out (a firewall drops it, or the address or port is wrong); there is no route
Header reads the line every SSH server sends first, such as SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, and names the product, its version and the system it runs on (see Servers it recognizes) that the port is not SSH at all: a TLS port, a web server, an FTP or mail server; that the server closed the connection without a word (it refuses this address, or has too many connections at once), or after its first line (it refused this client)
Offer reads the server's list of algorithms, which it sends before anything is encrypted, and holds it against what this item offers: key exchange, host key, cipher, MAC and compression. The algorithm this item would use is in bold. a category with nothing in common, and why: an option of this item leaves the server's out (and what would be used without it), FIPS mode leaves them out, a server setting leaves them out, or this server has none of them. Also a warning when only old algorithms are in common, or when an option of the item names algorithms the server does not have.
Connect makes the real connection with the item's settings, key exchange and all, and hangs up before the login. The known hosts file is read as the item would, never written. that the connection works, with what was agreed (so the problem is the login or the folder); or where it fails and why (see The messages); the host key: known, new (the item would add it), or not the one in the file
Try alternatives only when Connect fails in the key exchange or right after it. Up to six more connections, two seconds apart, each changing one thing the server offers and this server has: a cipher with its own integrity check, another MAC, another key exchange, the other RSA signature, a smaller Diffie-Hellman group, compression off. It stops at the first one that works. The button says how many connections it may open. which change makes the connection work

The details of Offer: what the server offers and what the item offers, the algorithm in use in bold

None of these send a password or a key. A server that refuses addresses that open many short connections (OpenSSH from 9.8, or a tool such as fail2ban) can still count them: that is why the tries are few and spaced out, and only run when you press the button.

The verdict#

The last box says in one sentence what was found, and lists the item options that fix it, if any.

After Try alternatives: the first other key exchange connects, and the verdict lists the options for the item

Button What it does
Apply to this item puts the options into the item in the dialog. Press OK, then save the user, to keep them; close the dialog to drop them. Not offered in Jobs: a task has no field for these options, so the box lists them.
Copy for support copies every step as text: the server's address and answers, with no password and no user name
Add to case saves the steps in a Troubleshoot case, without connecting again; its zip carries them as sftp/sftp-diagnose-<host>-<time>.txt. Shown to administrators who may use Troubleshoot an issue, when a case is open.

The messages#

A failed SFTP connection says how far it got, in the message you see under Test, in a job's log and in the server's log. The server's log also gets a few lines with both sides' lists. The same words appear in Connect.

The message says It means What to do
the server sent nothing and closed the connection the other server refuses this address, or has too many connections at once give the partner the address your server connects from; with Route connection through DMZ that is the DMZ's
A TLS port … not SSH; A web server answered; An FTP server answered the port is not an SSH port the port, or the kind of item
closed the connection after its version line, before its list of algorithms the other server refused this client the partner's allow list or limits
Failed to negotiate algorithms … no MAC in common with SSH-2.0-…. The server offers only … the two sides have nothing in common in that category. The message says why: an option of the item, FIPS mode, or that this server has none of them. change or remove the option it names; otherwise the partner has to add one of the algorithms this server offers
the key exchange (…) did not complete: the server closed the connection the server stopped during the key exchange another key exchange the server offers (the message names one), or for a group exchange a 2048 bit group
the key exchange finished (…) but the first encrypted packets failed: Corrupt Mac on input the two sides disagree about the keys, the cipher or the MAC a cipher with its own integrity check, or another MAC (the message names one); Try alternatives finds one that works
the connection ended after … sent and … received …, during a key re-exchange the connection broke when the two sides changed keys, as SSH does now and then on a long transfer custom_setKeyReExchangeDisabled=true on the item, to confirm
The host key was not accepted; The host key does not match the server's key is not the one in the known hosts file ask the partner for the new fingerprint before you accept it (Checking the other server's key)

A connection that was up and is closed by the other server with no error, for example after it stayed idle, gets a line in the log at debug level 1 only.

Before build 27.0.0_2411, a connection that agreed on a SHA-1 key exchange together with hmac-sha2-512, its -etm form or chacha20-poly1305@openssh.com failed with "Corrupt Mac on input". From that build on it works.

The item options#

These settings of an SFTP item change which algorithms it offers. Apply to this item sets them for you.

Option What it does
custom_allowedKexs the key exchanges offered, comma separated; the rest are left out
custom_preferredKex the key exchange offered first
custom_allowedCiphers, custom_preferredCipher the same for ciphers
custom_allowedMacs, custom_preferredMac the same for MACs
custom_hostKeyType the host key types accepted, comma separated
custom_setDHGroupExchangeKeySize the size of group asked for in a Diffie-Hellman group exchange; 2048 is taken by nearly every server
custom_setKeyReExchangeDisabled true: never change keys during a connection
sftp_compress true: offer compression

Without them the item offers the algorithms of the server's SSH client settings (Ciphers), with the SHA-1 key exchanges last. In FIPS mode only what FIPS mode allows is offered, whatever these options say (FIPS mode).

Servers it recognizes#

Header names the server from its first line. Most products let their administrators change that line, and products built on a common SSH library often show the library's name: the name is a hint, not a proof.

Product Notes
OpenSSH, and OpenSSH in Windows what its version has and lacks: no curve25519, Ed25519 or chacha20 before 6.5; SHA-2 RSA signatures from 7.2; ssh-rsa (RSA with SHA-1) off by default from 8.8; strict kex from 9.6; from 9.8 an address that opens many connections without logging in is refused for a while; from 10.0 no finite field Diffie-Hellman by default. The system it runs on (Ubuntu, Debian, FreeBSD, Raspberry Pi OS) when the line says so.
Dropbear no SHA-2 RSA signatures before 2020.79; older versions miscount their largest packet with compression on
ProFTPD (mod_sftp) the version shown, if any, is mod_sftp's
AWS Transfer Family the algorithms come from the security policy its owner picked: Offer shows them
Azure Blob Storage SFTP Microsoft's known limits: idle connections end after 2 minutes, a file cannot be opened to read and write at once, a rename onto an existing name fails
Cisco network devices a group exchange may fail with large groups: try custom_setDHGroupExchangeKeySize=4096 or another key exchange
Solaris SunSSH SunSSH 1.0 cannot change keys: custom_setKeyReExchangeDisabled=true
Bitvise SSH Server 7.12 and 7.13 could refuse some RSA signatures (fixed in 7.14)
Wing FTP Server before 7.3.1 a key exchange could fail because of its host key order
Globalscape EFT the numbers in its line are its SSH library's, not EFT's. If listings start in the wrong folder, set dot_default_dir=true.
GoAnywhere MFT, MOVEit Transfer, Serv-U, JSCAPE MFT Server, SFTPGo, Cerberus FTP Server, SSH Tectia Server, WS_FTP Server, Syncplify.me Server, CompleteFTP, Titan FTP Server, Rebex, MikroTik RouterOS, Huawei devices named, with their version where the line has it
Maverick, Apache MINA SSHD, libssh, Paramiko, AsyncSSH, a Go program SSH libraries inside other products: the product itself may say more elsewhere
OpenText (GXS), WeOnlyDo, Azure the client sets the options these servers need by itself after the login
CrushMFT and CrushFTP their default line, which an administrator can change