Skip to content

DLP for SFTP, SSH, Telnet, FTP and SMTP: why most tools miss them and how to close the gap

DLP for SFTP, SSH, FTP and SMTP: why browser- and proxy-based DLP misses these channels, how data leaves through them, and how to inspect them without breaking work.

Ayati Cytech ResearchPublished 7 min read

Effective DLP for SFTP and SSH — and for FTP, Telnet and SMTP — means inspecting data on the endpoint, where it is still readable, rather than at a proxy that only understands web traffic. Most DLP deployments are strong on browser uploads and weak on these protocols, because the protocols bypass the inspection points the tools rely on. The result is a gap exactly where technical staff, partners and scripts move the most data.

This guide explains why the gap exists, what leaves through it, and how to close it without breaking the work that depends on these protocols.

Why do DLP tools miss non-HTTPS channels?

Most DLP deployments inspect data in one of two places: a browser extension on the endpoint, or a web proxy or gateway on the network. Both are built around HTTP and HTTPS.

The protocols in this guide do not travel that path:

Protocol Default port Encryption Why it slips past web-centric DLP
FTP 21 None (FTPS adds TLS) Not HTTP; clients such as FileZilla connect directly
SFTP 22 SSH Runs inside an SSH session; a TLS proxy cannot decrypt it
SSH / SCP 22 SSH Terminal sessions and scp copies never touch the browser or proxy
Telnet 23 None Legacy, but still found on network gear and older systems
SMTP 25, 587, 465 Often STARTTLS or TLS Desktop clients, scripts and apps send mail directly

A browser extension cannot see a terminal. A web proxy cannot see a connection that does not go through it, and even when it does, it cannot open an SSH tunnel the way it opens TLS. Network DLP appliances may recognise the protocol but generally cannot read the encrypted payload.

What actually leaves through these channels?

These are not exotic attack paths. They are everyday work tools, which is what makes them risky.

  • Database extracts over SFTP. An operations analyst at an Indian NBFC pushes a customer extract to a collections partner — or to the wrong partner, or to a personal server.
  • Source code over SSH. A developer uses scp or rsync to copy a repository to a personal VPS before leaving the company.
  • Bulk files over FTP. Pharma and manufacturing teams still exchange large files with vendors over FTP, sometimes in cleartext.
  • Pasted content in SSH sessions. Secrets, configuration files or query results pasted into a session on an unapproved host.
  • Mail from scripts and desktop clients. A reporting script that emails a daily file over SMTP, or an employee using Thunderbird with a personal mail account configured.

Each of these can carry Aadhaar numbers, PAN numbers, card data, formulations or source code — the data your DLP policy exists to protect.

How to tell whether your DLP has this gap

You can find out in an afternoon. Prepare a harmless test file that your DLP policy should treat as sensitive — for example, a spreadsheet of dummy records in valid PAN format, or a document carrying your “confidential” keyword. Then, from an ordinary managed laptop:

  1. Upload it through a browser to a personal webmail account. This is your baseline; most tools will catch it.
  2. Send it as an attachment from a desktop mail client configured with an external SMTP server.
  3. Upload it with an FTP client such as FileZilla to a test server you control.
  4. Copy it with scp and upload it with sftp to the same server.
  5. Open an SSH session to the server and paste the file’s contents into the terminal.
  6. Repeat steps 1 to 4 from the same laptop on a home or mobile hotspot connection.

For each step, record two things: was the transfer stopped, and does a record exist that names the user, the file and the destination? Any step where the answer is “no” is a channel your organisation is currently trusting to luck. Share the results with your risk committee; they are often more persuasive than any vendor slide.

Why “just block the port” does not work

The traditional answer is to close ports 21, 22 and 23 at the firewall. It fails for predictable reasons:

  1. Developers need SSH. Git over SSH, server administration and deployment pipelines all use port 22.
  2. Partners need SFTP. Banks, insurers and pharma companies exchange regulated files with partners over SFTP every day.
  3. Exceptions pile up. Each business need becomes a firewall exception, and after a year the rule is a long list nobody reviews.
  4. No content awareness. A firewall sees an address and a port. It cannot tell a harmless log file from a customer database.
  5. No record that helps an investigation. A dropped connection tells you little about who tried to send what.

How to close the gap: inspect on the endpoint

The endpoint is the one place where SFTP, SSH, FTP, Telnet and SMTP data is visible before it is encrypted or leaves the device. An endpoint DLP agent that governs every application — not just the browser — can apply the same policy to all of them.

What that looks like in practice:

  • Protocol-aware inspection. The agent recognises FTP, SFTP, SSH, Telnet and SMTP from any client, including FileZilla, WinSCP, PuTTY, OpenSSH, Outlook and scripts.
  • Content and file-type rules. The same rules you use for web uploads apply to these channels.
  • Destination-aware policy. Allow SFTP to sftp.partner-bank.in and SSH to git.contoso.in; block both protocols to every other destination.
  • Per-user and per-group policy. Engineering can reach build servers; finance can reach the payments partner; nobody can reach an unknown VPS.
  • A record of every attempt. User, device, application, destination, file and the rule that fired.

For the full comparison of where DLP can run, see endpoint DLP vs network DLP.

A worked example: Contoso Life Insurance

Contoso Life, an insurer in Mumbai, exchanges policyholder files with three partners over SFTP, runs nightly SMTP reports to its reinsurer, and has a 60-person engineering team.

Before: port 22 was open for engineering and the three partner addresses. SMTP was allowed from anywhere to the mail relay. The web proxy and DLP tool covered browser uploads only.

Policy after moving to endpoint inspection:

Group Protocol Allowed destinations Everything else
Policy operations SFTP The three partner hosts Block and log
Engineering SSH, SFTP git.contoso.in, build and staging servers Block and log
Reporting service account SMTP Corporate mail relay only Block and log
All users FTP, Telnet None Block and log
All users Any Files matching policyholder data rules to unapproved destinations Block, alert data protection team

The firewall rules became simpler, not more complex, and the security team gained a record of every attempted transfer.

A rollout checklist

  • List every application in use that speaks FTP, SFTP, SSH, Telnet or SMTP
  • List every legitimate destination: partners, Git hosts, servers, mail relays
  • Group users by the destinations they genuinely need
  • Deploy in monitor mode for two to four weeks and review what is actually sent
  • Add destination allow lists per group
  • Turn on blocking for FTP and Telnet first (usually lowest business impact)
  • Then enforce SFTP and SSH destination policy
  • Then enforce SMTP from non-approved clients and destinations
  • Review the logs monthly and retire unused allow-list entries

How this supports compliance

Regulators rarely name protocols, but they do expect you to know how data leaves and to control it. India’s Digital Personal Data Protection Act, 2023 requires reasonable security safeguards to prevent personal data breaches. An auditor reviewing your DLP programme will reasonably ask whether a file sent over SFTP gets the same scrutiny as one sent through a browser. A policy that covers every channel, with a record for each, is the clearest answer.

Where AyatiData fits

AyatiData was built for this gap. Its agent governs every application on the computer and inspects FTP/SFTP, SSH/Telnet and SMTP as well as HTTPS, with SSL decryption on the endpoint and a web proxy in the same agent. Destination-aware allow lists let you open SSH or SFTP to approved hosts and block the same protocols everywhere else, with no firewall exceptions to maintain and every attempt logged.

If your engineering teams are the main concern, read DLP for developer teams. To test your own SFTP and SSH flows, book an AyatiData demo.

Frequently asked questions

Can DLP inspect SFTP uploads?

Only if it sits where the data is readable. SFTP runs inside an encrypted SSH session, so a network proxy built for HTTPS cannot see the file. An endpoint agent that governs the SFTP client on the device can apply policy before the data is encrypted.

Why doesn’t my web proxy see SSH or SFTP traffic?

Web proxies are built to understand HTTP and HTTPS. SSH, SFTP, FTP, Telnet and SMTP are different protocols, often on different ports, and many clients connect directly rather than through the proxy.

Should we just block port 22 at the firewall?

Blocking port 22 for everyone usually breaks Git, server administration and partner file transfers, so exceptions accumulate until the rule means little. Destination-aware policy — allow SSH to approved hosts, block it elsewhere — is more precise and keeps a record of every attempt.

Is SMTP a DLP risk if we already scan Outlook web traffic?

Yes. Desktop mail clients, scripts and applications can send mail directly over SMTP, bypassing browser-based controls and sometimes the corporate mail gateway. DLP should inspect SMTP from any application on the endpoint.

See AyatiData on your own estate.

A 30-minute walkthrough on your own use case — endpoint, data, code, passwords, AI or network.