Comparisons

AS2 vs SFTP: choosing a secure protocol for B2B file exchange

How AS2 and SFTP differ in security, delivery proof and operational effort, and which to use for EDI and file exchange.

2 min read · Updated October 29, 2026

The short answer

AS2 and SFTP both move files securely. AS2 sends messages over HTTP or HTTPS with message-level encryption, digital signatures and signed delivery receipts (MDNs), which makes it popular for EDI with retailers. SFTP transfers files over an encrypted SSH connection and is simpler to set up but does not provide signed proof of delivery on its own.

AS2 vs SFTP

CriteriaAS2SFTP
TransportHTTP or HTTPS with S/MIME message securitySSH File Transfer Protocol
Delivery proofSigned message disposition notifications (MDNs)None built in; relies on logs or follow-up files
AuthenticationX.509 certificates for signing and encryptionSSH keys and/or passwords
Connection modelPush: each side sends to the other's endpointClient connects to a server to upload or download
Common useRetail and supply chain EDIBank files, bulk data and many B2B exchanges
AS2: pushed, signed and receiptedSequence diagram of AS2: the sender wraps the message in S/MIME, encrypting and signing it, sends it over HTTP or HTTPS to the receiver’s AS2 endpoint, and receives a signed MDN receipt, either on the same connection or separately.AS2: pushed, signed and receiptedThe sender pushes each message to the partner’s AS2 endpointSenderReceiver’s AS2 endpointWrap in S/MIME: encrypt and signMessage over HTTP or HTTPSSigned MDN receiptSame connection (synchronous) or separately (asynchronous)
AS2: pushed, signed and receiptedSequence diagram of AS2: the sender wraps the message in S/MIME, encrypting and signing it, sends it over HTTP or HTTPS to the receiver’s AS2 endpoint, and receives a signed MDN receipt, either on the same connection or separately.AS2: pushed, signed andreceiptedThe sender pushes each message to thepartner’s AS2 endpointSenderReceiver’s AS2endpointWrap in S/MIME: encrypt and signMessage over HTTP orHTTPSSigned MDN receiptSame connection(synchronous) or separately(asynchronous)

The signed MDN is proof that the message arrived intact, which is why AS2 is common in retail EDI.

Expand diagram Download SVG

SFTP: a client uploads to a serverSequence diagram of SFTP: the client opens an encrypted SSH session authenticated by key or password and uploads a file to the server, where it waits until the partner’s system polls for it. Any confirmation comes from server logs, file naming conventions or acknowledgment files rather than a signed receipt.SFTP: a client uploads to a serverOne side runs the SFTP server; the other connects to upload or downloadSFTP clientSFTP serverOpen an encrypted SSH sessionAuthenticated by key or passwordUpload the fileFile waits until the partner’s system polls for itConfirmation, if agreedFrom logs, file naming or an acknowledgment file, not a signed receipt
SFTP: a client uploads to a serverSequence diagram of SFTP: the client opens an encrypted SSH session authenticated by key or password and uploads a file to the server, where it waits until the partner’s system polls for it. Any confirmation comes from server logs, file naming conventions or acknowledgment files rather than a signed receipt.SFTP: a client uploads to aserverOne side runs the SFTP server; the otherconnects to upload or downloadSFTP clientSFTP serverOpen an encrypted SSHsessionAuthenticated by key orpasswordUpload the fileFile waits until the partner’ssystem polls for itConfirmation, if agreedFrom logs, file naming or anacknowledgment file, not asigned receipt

SFTP is simpler to set up and good for large files and scheduled batches, but on its own it gives no signed proof of delivery, and polling schedules affect timing.

Expand diagram Download SVG

Both secure, built differently

AS2 and SFTP are the two most common ways to send business files directly between companies. Each encrypts data in transit, but they were designed for different purposes.

AS2

AS2 (Applicability Statement 2) wraps each message in S/MIME security and sends it over HTTP or HTTPS to the partner’s AS2 endpoint. The message is encrypted so only the receiver can read it and signed so the receiver knows who sent it and that it was not altered. The receiver returns a signed MDN, a receipt proving the message arrived intact.

Strengths: proof of delivery and non-repudiation through signed receipts, near-real-time push delivery, wide adoption in retail EDI. Receipts can be returned on the same connection (synchronous) or separately (asynchronous), which partners specify during setup.

Effort: each partner connection needs AS2 identifiers, URLs and certificates, and certificates must be renewed and exchanged before they expire.

SFTP

SFTP transfers files over an encrypted SSH session. One side runs an SFTP server; the other connects as a client to upload or download files, authenticated by keys or passwords.

Strengths: simple, widely supported, good for large files and scheduled batches, common with banks and data providers.

Effort: lower setup effort, but delivery confirmation must come from server logs, file naming conventions or acknowledgment files, and polling schedules affect timing.

Choosing between them

  • Use AS2 when partners require it or when signed proof of delivery matters, which is typical in retail and supply chain EDI.
  • Use SFTP for bank files, bulk data, partners that prefer it, or internal transfers.
  • Avoid plain FTP for business data.

Managed file transfer platforms support both, monitor every transfer and track certificate and key expiry, so you can use the right protocol per partner without separate tools.

Frequently asked questions

Which is more secure, AS2 or SFTP?

Both provide strong encryption in transit when configured correctly. AS2 adds message signing and signed receipts, which give stronger proof of origin and delivery.

Why do retailers prefer AS2?

Signed receipts give both sides proof that a document was delivered, which matters for compliance and dispute resolution.

Is FTP still acceptable?

Plain FTP sends data unencrypted and should be replaced with SFTP, FTPS or AS2 for business data.

Have an EDI question we did not answer?

ECOM's integration specialists can review your partners, documents and systems and recommend next steps.