Error occurring during the SSH handshake with ADF

Justin Doh 1,000 Reputation points
2026-09-14T21:28:00.8833333+00:00

I am trying to find a solution on this error when I tried to copy data from a client who uses AWS for SFPT.

I am using ADF (Azure Data Factory) to move data from this client's SFTP.

Bottom is details of error message:

ErrorCode=SftpFailedToConnectToSftpServer,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to connect to Sftp server 's-93b17c7faf6f45218.server.transfer.us-east-1.amazonaws.com'.,Source=Microsoft.DataTransfer.ClientLibrary.SftpConnector,''Type=Renci.SshNet.Common.SshConnectionException,Message=Server HMAC algorithm not found,Source=Renci.SshNet,'

When I tested the connection, it is working fine, but when I tried to copy data, error occurs.

I am trying to find a solution on my end before reaching out to the client and ask them to modify their configuration.

The question for me is, why does it work when I tested connection, but it fails when I try to copy data?

I am also able to preview the data from a client's SFTP (in ADF) even though it is slow, but not sure why it fails when I try Copy data.

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.


2 answers

Sort by: Newest
  1. Vinodh247-1375 44,716 Reputation points Volunteer Moderator
    2026-09-15T16:56:37.0166667+00:00

    The key clue here is the specific error:

    Server HMAC algorithm not found

    This indicates the failure is occurring during SSH algorithm negotiation, before any file transfer begins. In practice, it usually means the SFTP server and the SSH client used by the ADF Copy activity cannot agree on a common HMAC/MAC algorithm.

    What makes your scenario interesting is that:

    • Test connection succeeds
    • Preview data succeeds (although slowly)
    • Copy activity fails

    This suggests the issue is unlikely to be networking, firewall rules, credentials, or folder permissions. If those were the problem, Preview would typically fail as well.

    One possibility is that Test Connection and Preview do not exercise exactly the same code path as the full Copy activity. The Copy activity establishes the actual transfer session and may perform a different SSH capability negotiation than the lightweight validation or preview operations. As a result, a linked service can validate successfully while the transfer session later fails during HMAC negotiation. [learn.microsoft.com]

    Before asking the client to modify their AWS Transfer Family configuration, I would verify:

    1. The Copy activity is using the same linked service and integration runtime that were used for the successful connection test.
    2. The issue is reproducible across multiple files and is not tied to a specific dataset configuration.
    3. Whether the failure occurs consistently for every Copy run, which would further support an SSH algorithm compatibility issue rather than an intermittent connectivity problem.

    If those checks are confirmed, the evidence points strongly toward a server-side HMAC/MAC algorithm compatibility mismatch. At that stage, the client can review which MAC algorithms are enabled on the AWS SFTP endpoint and compare them with those supported by the ADF SFTP connector.

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-09-14T21:28:22.6766667+00:00

    The failure is most likely due to SSH algorithm compatibility during the actual copy session, not a basic connectivity problem.

    Server HMAC algorithm not found indicates the SFTP server is offering HMAC algorithms that Azure Data Factory does not support for the copy operation. A similar accepted Microsoft Q&A answer states that ADF does not support the -etm HMAC variants required by some SFTP servers, and when the server does not offer a compatible algorithm, the connection fails.

    Why test connection or preview can appear to work while Copy fails:

    1. They are not guaranteed to exercise the same transfer path. Test connection validates that ADF can reach the server and complete a basic connection check.
    2. Preview is a lighter operation. It may succeed slowly while the full copy activity opens transfer sessions that require algorithm negotiation the server rejects.
    3. Copy can create multiple connections. ADF can open parallel connections during download, and the SFTP troubleshooting guidance notes that multiple parallel connections can trigger server-side throttling or different SSH/SFTP failures.

    Actions to try on the ADF side first:

    1. Confirm the linked service type is SFTP Make sure the linked service is Sftp, not FTP. The SFTP linked service default port is 22 unless the server uses a different port.
    2. Limit concurrency to 1 In the SFTP dataset or copy settings, set maximum concurrent connections to 1 and rerun the copy. This is specifically recommended when copy fails but connection behavior is inconsistent, because parallel connections can trigger server throttling.
    3. If writing to SFTP, disable temp-file rename only when rename is unsupported This does not apply to reading from the client SFTP source, but it matters if the destination is also SFTP and errors such as UserErrorSftpPathNotFound, UserErrorSftpPermissionDenied, or SftpOperationFail occur during write.
    4. Validate the server’s supported SSH/HMAC settings with the client If concurrency = 1 does not help, the remaining likely cause is cryptographic incompatibility on the server side. In that case, the client must enable an algorithm supported by ADF, or a bridge pattern is needed.

    What this means for resolution:

    • If reducing concurrent connections to 1 fixes it, the issue is likely server throttling during copy.
    • If it still fails with Server HMAC algorithm not found, this is a server/ADF compatibility issue rather than an ADF misconfiguration.
    • In that case, the practical options are:
      • ask the client to enable an ADF-compatible algorithm on the SFTP server, or
      • use an intermediary such as an Azure VM or Azure Function App to pull from SFTP and then hand off to ADF through a supported store such as HTTPS or Azure Blob Storage.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.