The payroll partner needs somewhere to send tonight's file. Your SAP batch needs to collect it before processing starts, and the security team wants to know who can retrieve it, where it's stored, and how access gets revoked. Someone has suggested installing OpenSSH on a Linux VM. That might be the right answer, but it isn't the first decision.
A reliable SFTP server setup starts with the operating model: where the endpoint sits, which system owns the files, and who maintains identities after onboarding. A successful login proves connectivity. It doesn't prove that the batch will survive an interrupted upload, an expired supplier relationship, or a server rebuild.
Table of Contents
- Which SFTP Server Model Fits the Workload
- How to Build an OpenSSH SFTP Server
- Keys Users and Chroot That Hold
- Connect SAP Batches and Partner Clients
- Run Keys Alerts and Hardening After Go-Live
- Fix the Failures a Login Test Misses
- Choose Who Operates the Endpoint
Which SFTP Server Model Fits the Workload
For a legacy SAP partner drop with unusual filesystem requirements, I would start with self-managed OpenSSH. For a cloud landing zone, I would put a managed endpoint in front of the storage platform the data pipeline already uses.
SFTP deployment models and 2026 cost anchors
| Model | Best when | Endpoint and storage | 2026 starting cost | Who patches |
|---|---|---|---|---|
| Self-managed OpenSSH on Linux | Legacy partners, private paths, custom chroot or filename rules | You place the listener, often in a DMZ; files use local or mounted storage | VM plus administration time; no protocol license | Your team |
| Azure Blob Storage SFTP | Files must land in a storage account Fabric or Data Factory already reads | Microsoft endpoint; objects stay in Blob | Budget storage plus the SFTP feature under your agreement | Microsoft for the service; you for identity and containers |
| AWS Transfer Family | System of record is S3 or EFS | Managed SFTP endpoint; files reside in S3 or EFS | AWS publishes $0.30 per endpoint hour plus $0.04 per GB uploaded or downloaded | AWS for the endpoint; you for network, identity, and storage permissions |
| Shared managed SFTP | Small partner count and hosting included | Vendor endpoint with storage connectors | SFTP.cloud lists $240 per month or $2,400 per year, including 15 transfer accounts and three storage connectors | Vendor for the platform; you for accounts and keys |
Those prices are anchors, not complete budgets. Include storage, logging, backup, network charges where applicable, and the people who respond when a partner's job fails. For Azure, obtain the applicable SFTP feature charge under your agreement rather than assuming that Blob capacity covers the endpoint.
Separate reachability from storage access
Partners need access to the protocol endpoint, not your internal storage network. For a self-managed design, place the listener in a DMZ or equivalent restricted network and give it narrowly scoped access to private storage. The secure SFTP architecture guide recommends separating the exposed endpoint from storage in a private subnet without inbound partner ports.
Managed object-storage services express that boundary differently. Partners connect through SFTP while your pipeline accesses the objects through the storage service's controls. Don't assume that selecting a managed endpoint automatically configures private access, malware quarantine, retention, or recovery.
Choose OpenSSH when you need filesystem behavior you can inspect and control. A bank's client might depend on rename semantics, a customs broker might require a private network route, or a batch might expect a particular directory layout. That flexibility comes with ownership of operating-system maintenance and storage recovery.
Choose Azure Blob SFTP when landing files directly in Blob removes an unnecessary staging server. Choose Transfer Family when S3 or EFS is already the destination. A shared host makes sense when buying a bounded set of accounts is simpler than operating another service.
Make the ownership decision explicit
Before approval, name the team responsible for the endpoint, the storage, and failed transfers. Agree on recovery-time and recovery-point targets against the business batch deadline, not just infrastructure availability.
Decision record: Managed SFTP endpoint, restricted partner ingress, private landing storage, platform team owns identities, service provider patches the endpoint.
Write your equivalent line before installing anything.
How to Build an OpenSSH SFTP Server
Use this path when self-managed Linux wins the architecture decision. The OpenSSH manuals document the subsystem, authentication, access restrictions, and daemon settings that make this a controlled SSH service rather than an unrestricted file drop.
SFTP is not FTPS. SFTP carries commands and file contents through SSH, normally using TCP port 22, while FTPS adds TLS to FTP, a distinction grounded in the SSH connection protocol specification. You're configuring SSH here, not TLS-wrapped FTP.
The installation flow is straightforward; the permissions and acceptance tests deserve equal attention.

Configure the service and restricted accounts
Install a maintained OpenSSH server. On a Debian-family host, use
sudo apt install openssh-server. Insshd_config, explicitly setSubsystem sftp internal-sftp, replacing an existing SFTP subsystem declaration rather than adding a duplicate. This prevents reliance on an unexpected external subsystem path.Create an account for each integration. Use a dedicated group such as
sftpusers, then apply restrictions throughMatch Group sftpusers. Separate accounts let you revoke a supplier without disrupting unrelated jobs.Force file-transfer-only access. Within that match block, set
ForceCommand internal-sftp. Also setDisableForwarding yesandPermitTTY no; forcing SFTP alone isn't a substitute for disabling unnecessary SSH capabilities.Restrict admission deliberately. Use
AllowGroupsorAllowUsers, accounting for both transfer identities and administrators. An allowlist that omits the administration group can lock out the people maintaining the server, so retain a working administrative session during changes.Build the jail correctly. Set
ChrootDirectory /sftp/%u. Keep that directory and its parent path root-owned and not writable by the transfer user; create/sftp/partner_payroll/uploadas the writable child owned by the account or its dedicated group. Permissions such as0755on the jail root and0750on the upload directory are a practical starting point, adjusted for the processing group.Install the public key only. Set
PubkeyAuthentication yes, withPasswordAuthentication noandKbdInteractiveAuthentication noscoped to machine accounts. Use a root-managed location such asAuthorizedKeysFile /etc/ssh/authorized_keys/%u, and verify ownership and permissions. The client's private key belongs in its secrets-management process, not on the receiving server.
Verify before exposing the listener
Validate configuration before reload. Run
sudo sshd -t, then inspect the effective configuration for a representative restricted user withsshd -T -C. Reload the service only after validation passes, keeping your administrative session open.Exercise operations and evidence. Test listing, upload, download, rename, and deletion according to the account's intended permissions. Confirm that
cd ..cannot escape the jail; enable operation logging with an appropriateinternal-sftplogging level, such as-l INFO, and verify that events reach your collector.
Before production, test quota exhaustion, unusual filenames, concurrent sessions, interrupted transfers, duplicate filenames, and full-disk recovery. Managed-service users can skip package installation, but not these behavioral tests.
If a separate administrative interface needs HTTPS, Kogifi's guide to generate local certificates with OpenSSL can help with local testing. Those certificates don't replace SSH host keys or authenticate this SFTP service.
Keys Users and Chroot That Hold
Start with an identity record, not a key-generation command. Each machine identity needs an owner, purpose, environment, algorithm, fingerprint, creation date, and review or expiry date. Record where the corresponding private key is held and which job uses it, without copying the private material into the inventory.
NIST's guidance on interactive and automated SSH access treats provisioning, termination, and monitoring as essential parts of access management. Generating a strong key addresses only part of that lifecycle.

Restrict what an authenticated identity can do
A separate key pair per system prevents an emergency revocation from becoming a search across unrelated integrations. Place only its public half in authorized_keys, and associate the fingerprint with the inventory record so an authentication event can identify the credential used.
Use filesystem ownership and POSIX groups to grant the required operations. A sender that only deposits files shouldn't automatically receive read or delete access to other partners' deliveries. Test the processing service's access too, because a correctly isolated partner account is useless if the downstream job can't read its uploads.
Where supported, apply per-key source restrictions and options such as no-agent-forwarding, no-port-forwarding, no-X11-forwarding, and no-pty. Source restrictions work best when the partner can identify its actual egress networks, including failover paths.
Client verification matters as much as server authentication. Pin the server's host key through managed known_hosts entries or a controlled fingerprint-verification process. A mismatch must stop the job for investigation, not trigger automatic acceptance of a replacement key.
For Azure Blob SFTP, translate filesystem isolation into the service's supported local-user scopes and container permissions. Don't assume a POSIX chroot model or an arbitrary identity integration applies unchanged; verify the authentication capabilities enabled for your service.
Set pilot acceptance criteria
Use explicit pass criteria rather than a vague connection-success target:
- Authentication: Every approved controlled test authenticates with the intended identity and credential.
- Isolation: No test can reach another partner's files or escape the permitted namespace.
- Machine credentials: Automated jobs have no remaining password dependency.
- Evidence: Account changes, key changes, sessions, and permitted file operations produce usable audit records.
These are acceptance conditions, not a claimed industry success rate. Include retries, network interruptions, large files, and parallel sessions in the pilot, then establish operational thresholds from what your workload does.
A public key without an owner is still an unmanaged credential. Removing password login doesn't make it governed.
Connect SAP Batches and Partner Clients
Prioritize SFTP version compatibility over optional protocol features. The SFTP protocol history identifies version 3 as the most commonly implemented version and records OpenSSH support since March 7, 2001. Later-version features and vendor extensions shouldn't become onboarding requirements unless the actual partner client supports them.
Use the transfer path below to identify where completion, validation, and processing ownership change.

Make outbound completion unambiguous
For an SAP outbound job, assign a dedicated transfer identity, a fixed destination directory, and a filename contract. Include the business date or another agreed identifier so the receiver can distinguish a retry from a new delivery.
Upload under a temporary name, then rename after the transfer completes. Test the destination's rename behavior, particularly when its filesystem view maps to object storage. The receiving process should ignore temporary names and validate the completed file before posting anything into a business system.
Transport success isn't business acceptance. Record whether the receiver accepted the file, rejected its contents, or already processed that identifier. Where the flow includes EDI transformations, define that responsibility alongside SAP and EDI integration rather than hiding it inside a transfer script.
This supporting walkthrough can help the team discuss the mechanics of the connection.
Land inbound files where processing belongs
An inbound Azure flow should land in the Blob container the pipeline is authorized to read. An AWS flow should use the intended S3 prefix or EFS path. With a DMZ-hosted server, move validated deliveries into private processing storage rather than letting SAP reach back into an exposed upload directory.
Keep untrusted arrivals separate from accepted inputs. Configure malware scanning, encryption at rest, retention, and processing permissions on the storage workflow; the SSH tunnel doesn't provide those controls.
Test authentication, listing, upload, download, rename, permissions, large-file handling, and resume using the real batch client, not just an administrator's desktop application. A desktop success says little about the runtime libraries, key formats, or network route used by the scheduled job.
For an FTP migration, run a controlled comparison before cutting over each partner. Prevent dual-running from causing duplicate business postings, preserve the filename and schedule contract, and document recovery targets against the batch window. An aging host can justify moving to a managed endpoint, but the migration isn't complete until the receiving business process accepts the files.
Run Keys Alerts and Hardening After Go-Live
Rotation becomes difficult when nobody knows which scheduled job holds the old private key. Design the replacement process around the SAP, banking, or supply-chain schedule, with a maintenance window that doesn't collide with a critical transfer.
Where the service supports overlapping keys, install the replacement public key, switch the client, verify a successful scheduled run, and remove the old key. Set a deadline for that overlap so temporary access doesn't become permanent.
The operating checklist belongs beside the deployment record.

Make lifecycle changes auditable
The Ridgeon Network SFTP setup guide highlights key management, access controls, and auditing as continuing security responsibilities. Turn those responsibilities into named actions: who approves issuance, who installs the key, who reviews access, and who can revoke it during an incident.
Define expiry or review dates, emergency revocation, controlled break-glass access, and evidence retention. Review the inventory on a calendar and remove access when a partner contract ends, even if the account hasn't recently transferred anything.
Key-only login isn't a security strategy if nobody can revoke a key without breaking Friday's batch.
Alert on identities and delivery outcomes
Send actionable events into the monitoring process, not just a log archive:
- Authentication anomalies: Failed-login bursts, unexpected source networks, and repeated attempts against disabled accounts.
- Credential changes: Added or removed keys without an approved change record.
- Transfer anomalies: Unusual download volume, missing expected deliveries, or files left under temporary names.
- Processing failures: Files received successfully but rejected or never consumed downstream.
Tie each alert to the account, credential fingerprint where available, affected file, and owning team. An investigation needs an identity and a ticket or SIEM case, not merely a server timestamp.
Patch the SSH package or account for the managed service's maintenance process. After a rebuild, verify the host-key distribution plan before resuming jobs; don't train operators to bypass identity warnings.
Keep forwarding disabled, remove unused accounts, and prove that storage backups can be restored into a usable processing path. Align these activities with the broader cloud infrastructure security operating model so the file-transfer endpoint doesn't become an exception nobody maintains.
Fix the Failures a Login Test Misses
A user can authenticate successfully and still be unable to upload. Start with the target directory's ownership and permissions, not the cipher configuration. The jail root is supposed to be non-writable; the account needs an authorized writable child.
SFTP symptoms, causes, and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Login works, upload fails | No writable child inside the chroot, or wrong owner on /upload |
Keep the jail root root-owned and non-writable; add or correct writable /upload |
User can leave the folder with cd .. |
ChrootDirectory missing or ineffective; a writable jail root usually prevents session startup |
Set ChrootDirectory and ForceCommand internal-sftp; correct ownership and retest escape |
| Batch fails, laptop works | Source restriction, missing key, or batch still expects a password | Check batch egress, install its public key, and configure key authentication |
| One partner cannot list or resume | Unsupported protocol behavior or extension | Use baseline-compatible behavior and retest listing, upload, download, rename, and resume |
| Partial or missing files | Missing completion rename, quota exhaustion, or full disk | Write then rename; alert on quota and disk capacity before the batch window |
| Host-key warning after rebuild | Clients still pin the previous fingerprint | Verify the replacement host key before updating known_hosts |
Reproduce the failure from the batch host
Run the same client, identity, destination path, and file operation that failed in production. Enable client-side diagnostic output and correlate it with server authentication and operation logs. Change a single control, then rerun the same test so you can identify what fixed the problem.
Network interruptions need their own evidence. RDE Technologies' guidance to establish a network traffic baseline is useful when distinguishing ordinary batch traffic from unexpected retransmissions, connection drops, or competing workloads.
Don't weaken access restrictions to make a diagnostic session succeed. If a source allowlist excludes the batch host, correct the approved egress definition instead of opening access broadly.
Diagnostic boundary: If the raw SFTP client completes the same operation but the business batch fails, investigate the wrapper, scheduler, parser, and downstream processing before changing the server.
Preserve failed files and relevant logs under your retention policy. They help distinguish a truncated transfer from a valid file the receiver couldn't parse.
Choose Who Operates the Endpoint
Write the operating decision in one place: deployment model, network boundary, partner identity, compatible client behavior, key owner, rotation window, and alert destination. Add the recovery target and the person authorized to suspend a compromised integration.
Keep the service in-house if your team can patch it, rotate credentials without missing the business deadline, and restore the files needed to restart processing. A managed endpoint removes some infrastructure work, but your organization still owns authorization and business outcomes.
Keep SAP-to-Azure ownership together
If the endpoint mainly lands SAP or partner files in Azure for analytics, assign the pipeline and its operations to the same accountable team. Our cloud managed services can support that operating model rather than leaving a standalone file server between infrastructure and data engineering.
For a broader transition, our Velocity accelerator provides no-code SAP-to-Azure ingestion and is fully compliant with SAP's RFC extraction restrictions; Pulse supports SAP data migration planning, execution, and validation. These are relevant when the file drop is a transitional bridge rather than the intended long-term integration.
Our teams also harmonize SAP SCM logic with Microsoft Fabric and Azure. That keeps the transfer decision connected to the supply-chain processes consuming the data, rather than treating file arrival as the end of the job.
Kagool offers SAP and Microsoft integration, data-platform delivery, and managed services for teams moving partner files into an accountable cloud workflow. Visit Kagool to arrange a design discussion, bringing your endpoint choice, storage destination, key owner, batch deadline, and on-call responsibilities.

