(SSH): Transferring files from client to server
If you’re a developer using both Windows and Mac or you want to create you own space, securely transferring files and setting up passwordless SSH login can make your life easier. In this post, I’ll walk through how to make your Mac a remote SSH server and use Windows as a client to:
- Access the Mac via SSH
- Transfer files securely using
scp
- Set up SSH key authentication with ED25519

Before we dive into file transfers or SSH keys, let’s first set up our two systems to communicate over SSH.
In this guide, we’ll:
- Use Mac as the SSH server
- Use Windows as the SSH client
This means our Mac will accept incoming SSH connections, and our Windows machine will connect to it — either to log in or transfer files.
Step 1: Make Your Mac an SSH Server
Your Mac has a built-in SSH server. Here’s how to enable it:
- Go to System Settings → General → Sharing
- Turn on Remote Login
Step 2: Get Your Mac’s IP Address
Open Terminal on Mac and run:
ipconfig getifaddr en0
(For Ethernet, use en1)
Step 3: Transfer a File Using scp
Now that the Mac is ready to accept connections, let’s transfer a file.
What is scp
?
scp
(Secure Copy) lets you send files over a network securely using SSH. It uses TCP and encrypts the data in transit.
From PowerShell on Windows, run:
scp C:\Users\YourName\Desktop\file.txt remote_user@remotemachine:/Users/YourName/Desktop/
For example:
scp C:\Users\YourName\Desktop\file.txt vignesh@192.168.1.10:/Users/vignesh/Desktop/
This command copies file.txt
from your Windows Desktop to your Mac Desktop.
You’ll be prompted for your Mac login password. That’s normal for now!
Step 4: Set Up SSH Key Authentication (To Skip Passwords)
Entering your password every time can get annoying. Let’s fix that by setting up SSH keys.
Generate an SSH Key on Windows
Run this in PowerShell:
ssh-keygen -t ed25519
- Press Enter to save in the default location.
- You can skip the passphrase or set one for added security.
Your keys will be saved in:
C:\Users\YourName\.ssh\
Send Your Public Key to the Mac
Now copy the public key (id_ed25519.pub
) to your Mac:
Add the Key to authorized_keys
on Mac
SSH into your Mac:
ssh vignesh@192.168.1.10
remote_user: vignesh
remote_machine: 192.168.1.10
Then on the Mac terminal:
mkdir -p ~/.ssh
cat ~/id_ed25519.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
rm ~/id_ed25519.pub
This installs the key and sets the correct permissions.
Final Test: Try SSH Again
Back in PowerShell:
ssh vignesh@192.168.1.10
You should now log in without a password prompt.
Quick Tech Note: Is scp
using TCP?
Yes — both scp
and ssh
use TCP on port 22. TCP ensures that:
Packets are delivered reliably
Data arrives in the correct order
The connection is encrypted via SSH
To know more about how SSH works and what Packets are. Checkout my blogs below!!