/
/

How to Design Secure File Transfer Workflows on Windows and Linux Servers

by Andrew Gono, IT Technical Writer
How to Design Secure File Transfer Workflows on Windows and Linux Servers blog banner image

Instant Summary

This NinjaOne blog post offers a comprehensive basic CMD commands list and deep dive into Windows commands with over 70 essential cmd commands for both beginners and advanced users. It explains practical command prompt commands for file management, directory navigation, network troubleshooting, disk operations, and automation with real examples to improve productivity. Whether you’re learning foundational cmd commands or mastering advanced Windows CLI tools, this guide helps you use the Command Prompt more effectively.

Key Points

  • Start with Purpose: Define which files must move between systems and who needs that ability.
  • Design Outbound Pathways: Configure one or two approved transfer mechanisms (e.g., SFTP or rsync over SSH) using approved client tools such as WinSCP where applicable.
  • Harden Session Types: Tune RDP, SMB, and SSH options to prevent clipboard, drive, or unauthenticated sharing.
  • Build Monitoring Around Movement: Log file-transfer sessions, correlate with account activity, and alert on unapproved utilities.
  • Prove Operational Integrity: Publish quarterly metrics on transfer channel uptime, approvals, and anomalies.

Servers provide resources to other endpoints over a network, and establishing workflows that enable Windows and Linux secure file transfer lets you avoid unwanted data loss. While most IT engineers would remove copy capabilities, MSPs can enforce role-based permissions in mixed environments for managed movement.

This article explains how to secure file transfers on both Windows and Linux servers via native tools and remote monitoring.

Windows and Linux secure file transfer guide

Before configuring server file transfers, consider your technical constraints.

📌 Prerequisites:

  • List of business workflows that require data export or ingestion
  • Defined user accounts or service identities authorized for file transfer.
  • Admin rights to configure RDP, SMB, and SSH services
  • SIEM or log collector to receive transfer and session data

Phase 1: Map and classify existing transfer paths

First, list active transfer channels to see how files are shared across your infrastructure. This helps harden your security posture for Windows and Linux systems.

This helps differentiate paths that already use encrypted transports (such as SSH) and identify workflows where rsync over SSH can reduce bandwidth usage through incremental transfers. Additionally, confirm that NTFS permissions are turned on to validate your security posture in your Windows Linux secure file transfer workflow.

Here’s how your Windows-Linux secure file transfer map should look:

ChannelDescription Exposure riskClassification 
Secure Message Block (SMB) sharesNetwork file shares using an SMB 3.x protocol with encryptionWeak NTFS permissions, SMB1 vulnerabilityApproved (harden)
RDP sessionsRemote Desktop Protocol for remote accessClipboard redirection, drive mappingUncontrolled (migrate)
SSHSecure file transfer over SSHMisconfigured keys, weak permissionsApproved (keep, harden)

Phase 2: Establish a single authorized transfer channel per server

Limiting the number of available channels is a proven method for secure file transfers, but the method varies depending on the operating system. That said, the process remains the same: create one standard channel, discard the rest, and enforce least privilege in your Windows Linux secure file transfer framework.

For Windows

  1. Install OpenSSH or a managed Secure File Transfer Protocol (SFTP) channel.
  2. Use SSH key-based authentication instead of passwords for accessing secure transfer paths.
  3. Disable outdated security protocols (e.g., FTP, SMB1) that can be easily exploited.

For Linux

  1. Use SFTP or the rsync utility to transfer data securely between two remote systems, or a remote machine and a local system.
  2. Use rules like AllowUsers or Match User.
    1. This ensures only authorized accounts can transfer files.

Phase 3: Close or restrict all other file-movement features

Here’s how to limit functionality on copy-paste functions for Remote Desktop, USB drives, personal cloud apps, and unsecured network shares while maintaining operational strength.

How to disable RDP clipboard

This limits cross-copy instances in your Windows Linux secure file transfer workflows.

  1. Press Win + R, type gpedit.msc, and press Enter.
  2. Navigate to:

Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection

  1. Find these settings:
    1. Do not allow drive redirection
      1. Set to Enabled.
    2. Do not allow clipboard redirection
      1. Set to Enabled.
  2. Do the following if you need a text-only clipboard:
    1. Enable Clipboard redirection, but configure RDP settings to allow text only.

How to block USB write access

Windows
  1. Press Win + R, type gpedit.msc, and press Enter.
  2. Navigate to:

Computer Configuration > Administrative Templates > System > Removable Storage Access

  1. To block USB write access, enable Removable Disks: Deny write access.
Linux

Create a udev rule for:

sudo usbguard list-devices

sudo usbguard block-device <device-id>

💡Important: USBGuard may not be installed by default on all Linux distributions and must be installed and enabled before these commands can be used.

How to block personal cloud sync tools via Intune

  1. Go to Microsoft Intune admin center > Endpoint security > App Control for Business.
  2. Create an App Control for Business policy.
  3. Configure built-in controls to allow trusted, signed applications and block unapproved executables.
  4. Assign the policy to the appropriate Windows device groups.

How to secure SMB network shares

  1. Right-click the shared folder.
  2. Select Properties > Security and assign least privilege (e.g., Read-only for consumers).
  3. Press Win + R, type gpedit.msc, and press Enter.
  4. Navigate to:

Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options

  1. Enable the following policies:
    1. Microsoft network client: Digitally sign communications (always)
    2. Microsoft network server: Digitally sign communications (always)

Phase 4: Build transfer logging and alerting

Windows systems use the Advanced Audit Policy to track file and share access. This built-in feature logs sharing across your infrastructure and signals file-level operations (e.g., write, read, delete) with event IDs, helping your team detect unauthorized deletions or data exfiltrations.

On the other hand, Linux machines rely on auditd, a kernel-level system that monitors file operations in your Windows Linux secure file transfer configuration.

  • Rules like -w /srv/xfer -p w -k transfer_activity check for any write operations.
  • Positive matches are tagged with the transfer_activity key.
  • These records are stored in /var/log/audit/audit.log and /var/log/secure.
  • System engineers can forward these logs to a SIEM for centralized analysis.

📌 Use Cases: Building data transfer logging and alerts with native tools.

On Windows

  1. Press Win + R, type secpol.msc, and press Ctrl + Shift + Enter.
  2. Navigate to:

Security Settings → Advanced Audit Policy Configuration → System Audit Policies → Object Access 

  1. Under Object Access, enable:
    1. Audit File Share (Success and Failure)
    2. Audit File System (Success and Failure) 
  2. Apply SACLs (System Access Control Lists) to relevant folders
    1. Right-click folder → Properties → Security → Advanced
    2. Open the Auditing tab and click Add
    3. Configure the auditing entry:
    4. Select the user or group to audit (for example, Everyone) and confirm the selection
    5. In the Auditing Entry window, set Type to Success
    6. Select the actions to audit (for example, Read, Write, and optionally Delete)
    7. Apply the changes
  3. Filter logs in Event Viewer to check for write operations.
    1.  Open Event Viewer → Windows Logs → Security.
    2. Filter by:
      1. Event ID 5145 – To identify SMB network access attempts that preceded the file operation
      2. Event ID 4663 – To confirm actual file operations (read, write, delete)

On Linux

  1. Enable auditd rules like -w /srv/xfer -p w -k transfer_activity.
  2. Forward /var/log/audit/audit.log and system authentication logs (such as /var/log/auth.log) to central logging
  3. Cross-check file transfer events with authentication logs to pinpoint unauthorized movement.

Phase 5: Operationalize through key rotation and approvals

To stay ahead of modern cyber threats, access keys need to be changed often, and permissions need to be reviewed on a regular cadence. To operationalize approvals, do the following:

  • Rotate SSH/SFTP keys when a suspicious event is detected, when personnel changes, or every 90 days
  • Maintain validated recipient lists
  •  Automate expiry alerts to reduce overhead

Phase 6: Reporting and assurance

Reporting metrics (e.g., account activity, blocked transfer attempts, channel uptime) showcases compliance with international standards like CIS and ISO 27001. Provide evidence with monthly newsletters to maintain trust and keep stakeholders informed in between quarterly business briefs.

Best practices summary table

Consider the following while building secure file transfer channels across Windows and Linux servers:

PracticePurposeValue delivered
Map all data movement pathsOrganize active transfer channelsProvides visibility before applying workflows
Standardize transfer toolsetSimplify managementCreates predictable behavior for technicians
Disable non-approved channelsReduce attack surfaceReduces exit points during data theft
Monitor file-transfer eventsEnhance auditabilityHelps alert technicians to potential security breaches
Rotate keys & review recipientsRobust security postureBuilds trust and supports SLA and compliance commitments

Automation example

Manual checks for RDP settings, Secure Shell (SSH) keys, and transfer logs are time-consuming and prone to human error. Automating your workflows helps improve consistency, reduce risk, and implement Zero Trust principles.

One way is to schedule tasks and centralize management. Doing this through native tools and third-party RMM streamlines:

  • Registry or Group Policy Objects (GPO) checks
  • SSH host key age and account usage queries
  • Transfer event filtering using relevant Event IDs
  • Compliance-related metrics and posture tracking

NinjaOne integration provides continuous monitoring

Servers support the rest of your client’s fleet, and NinjaOne’s consolidated dashboard gives your team the insight you need to track permissions, set alerts, and more. Here’s how NinjaOne simplifies Windows-Linux secure file transfer management:

StepWith NinjaOne
Standardize secure channelsIdentifies approved transfer channels and flags the presence of outdated protocols (e.g., SMB1, FTP)
Restrict non-approved movementCentrally manages RDP clipboard restrictions and Windows Defender Application Control (WDAC) policies in supported Windows environments
Build unified logging & alertsCombines file-transfer logs, Event ID monitoring, and permission tracking into one, streamlined dashboard
Correlate transfer activityCorrelates file movement events with authenticated session data, endpoint telemetry, and device health indicators
Support post-incident reviewsStores incident notes, SACL configuration visibility, transfer inconsistencies, and actions taken in one repository
Generate assurance reportsProduces exportable reports on file-transfer attempts that support reporting requirements aligned with CIS and ISO 27001 controls

Track file movement with a powerful endpoint platform

Securing data transfers does not have to come at the expense of productivity. By mapping existing transfer methods, standardizing approved channels, and enabling monitoring through a management platform, organizations can ensure file transfers use encrypted protocols and are properly logged for audit purposes.

Related topics:

FAQs

Evaluate file size, frequency, automation needs, and bandwidth constraints. SFTP suits controlled uploads/downloads, rsync excels at incremental sync jobs, and SSH tunnels are ideal when you need both interactive access and encrypted transfer.

Create time-bound accounts or one-time-use SSH keys, enforce expiration automation, and limit scope to a single directory to avoid lateral movement.

Use centralized auditing and logging (e.g., SSH/SFTP session logs, SIEM correlation, and process whitelisting) to confirm only approved transfer mechanisms and identities were used.

Immediately disable access keys, isolate the affected server, review authentication logs, and correlate movements with RDP/SSH session data to find the origin.

Conduct quarterly configuration reviews that include SSH key rotation, WDAC policy updates, Intune app control verification, and removal of stale accounts.

You might also like

Ready to simplify the hardest parts of IT?