How to SSH Into Your Mac from Windows (2026)

Mahesh Makvana
·
6 min read

Switching to Mac is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

If you’ve been struggling to access your Mac remotely from a Windows PC, SSH is the most direct solution. You get a full terminal session on your Mac, run scripts, manage files, check what’s eating disk space, from any Windows machine on your network.

The setup takes about five minutes. Windows 10 and Windows 11 both ship with a built-in SSH client, so you don’t need to install anything extra on the Windows side. You do need to enable one setting on the Mac first.

What You’ll Need

  • A Mac running macOS Ventura, Sonoma, or Sequoia
  • A Windows 10 PC (version 1803 or later) or Windows 11
  • Both machines on the same local network for a straightforward setup, or a configured router if you’re connecting over the internet (covered below)

Step 1: Enable Remote Login on Your Mac

macOS includes a built-in SSH server called Remote Login. It’s off by default.

  1. Open System Settings from the Apple menu.
  2. Click General in the left sidebar.
  3. Click Sharing.
macOS System Settings > General > Sharing panel open, showing the Remote Login row with its toggle in the off position
  1. Toggle Remote Login on.
macOS System Settings > General > Sharing with Remote Login toggled on and the SSH connection hint displayed below it, showing "ssh username@192.168.x.x"
  1. Click the i icon next to Remote Login to review two important options:

– Allow access for: choose All users or add specific accounts. If you’re the only one connecting, add your account explicitly rather than leaving it open to all. – Allow full disk access for remote users: turn this on if you want to browse your entire filesystem over SSH, including external drives. Leave it off if you only need access to your home folder.

The panel shows the exact SSH command to run, something like ssh [email protected]. That IP address is what you’ll use in the next step.

Step 2: Find Your Mac’s IP Address

The SSH hint in the Sharing panel already includes your local IP. If you’ve closed it, go to System Settings > Network, select your active connection (Wi-Fi or Ethernet), and the address is listed in the connection details on the right.

macOS System Settings > Network with Wi-Fi selected and the IP address highlighted in the connection details panel on the right side

This local IP, typically something like 192.168.1.42 is all you need when the Windows PC is on the same network. For connecting from a completely different network, skip to the port forwarding section below.

Step 3: Connect from Windows

Windows 10 (version 1803 and later) and Windows 11 both include the OpenSSH client. Open PowerShell, Command Prompt, or Windows Terminal and run:

ssh

If you see a block of usage instructions, OpenSSH is installed and you’re ready. If Windows says the command isn’t recognized, go to Settings > System > Optional features, click Add an optional feature, search for OpenSSH Client, and install it.

Connect to your Mac

With your Mac’s IP address ready, run:

ssh [email protected]

Replace yourusername with your Mac account name and 192.168.1.42 with your actual IP.

Windows Terminal with the command "ssh steve@192.168.1.42" typed and ready to execute

First connection only: SSH will ask you to verify the host key fingerprint. Type yes and press Enter. You’ll only see this prompt once per machine.

Enter your Mac account password when asked. Nothing appears as you type, SSH intentionally hides passwords in the terminal.

Windows Terminal showing the SSH login sequence: host key verification prompt with "yes" typed, followed by the password input prompt

Once authenticated, your terminal prompt changes to show your Mac’s hostname. You’re in.

Windows Terminal showing a successful SSH session connected to a Mac, with the Mac's shell prompt visible and ready for commands

Basic SSH Commands

Here’s what you can do once you’re connected.

List files in the current directory:

ls
Windows Terminal in an active SSH session showing the ls command output listing files and folders on the Mac

Change directory:

cd ~/Documents
Windows Terminal in an SSH session with cd ~/Documents run and the prompt updated to show the Documents directory

View a file’s contents:

cat filename.txt
Windows Terminal in an SSH session showing cat command output with the text contents of a file displayed

Create a new folder:

mkdir foldername
Windows Terminal in an SSH session showing the mkdir command creating a new directory on the Mac

Create a new empty file:

touch filename.txt
Windows Terminal in an SSH session showing the touch command creating a new empty file on the Mac

Delete a file:

rm filename.txt
Windows Terminal in an SSH session showing the rm command deleting a file on the Mac

rm is permanent. There’s no Trash on the command line, so double-check before you run it.

Connecting Over the Internet

The steps above work when both machines share the same local network. To SSH in from a different network, such as a hotel, a work office, or a coffee shop, you need two things: your Mac’s public IP address and port forwarding set up on your wireless router.

Find your public IP: On your home network, search “my ip address” in any browser. Google displays it at the top of the results.

Google search results page for "my ip address" with the public IP address displayed prominently in an answer box at the top

Set up port forwarding: Log into your router’s admin page, typically 192.168.1.1 or 192.168.0.1 and sign in.

Generic router admin login page at 192.168.1.1 showing username and password input fields

Find the port forwarding section. Depending on your router, it may sit under Advanced, NAT, or Firewall. Create a new rule with these values:

  • External port: 22
  • Internal port: 22
  • Internal IP: your Mac’s local IP (e.g. 192.168.1.42)

Enable the rule and save.

Router port forwarding configuration screen with port 22 set for both external and internal ports, the Mac's local IP address entered in the destination IP field, and the rule enabled

SSH runs on port 22 by default; forwarding that port sends incoming connections straight to your Mac.

One thing worth keeping in mind: exposing port 22 directly to the internet means your Mac will attract automated brute-force login attempts. Using a VPN to tunnel into your home network first is meaningfully safer than opening port 22 publicly.

Optional: PuTTY and Other Clients

The built-in OpenSSH client handles everything most people need. If you’d prefer a graphical interface, tabbed sessions, or built-in SFTP file browsing, PuTTY remains the most widely used free SSH client for Windows.

  1. Download and install it from putty.org.
  2. Enter your Mac’s IP address in the Host Name field.
  3. Confirm Port is 22 and the connection type is SSH.
  4. Click Open.
PuTTY Configuration window with a Mac IP address entered in the Host Name field, Port set to 22, SSH selected as the connection type, and the Open button highlighted

You’ll be prompted for your username and then your password, the same sequence as the command-line flow.

For file transfers, WinSCP pairs well with this setup. It connects over SFTP using the same credentials and port, and gives you a drag-and-drop interface between your Windows machine and your Mac, with no extra configuration needed on the Mac side.

Troubleshooting

“ssh: command not found” on Windows OpenSSH Client isn’t installed. Go to Settings > System > Optional features, click Add an optional feature, search for OpenSSH Client, and install it.

“Connection refused” or the connection times out Check three things: Remote Login is enabled in System Settings > General > Sharing, you’re using the correct IP address (verify it in System Settings > Network), and both machines are on the same network for local connections.

Password keeps getting rejected Make sure you’re entering your Mac account password, not your Apple ID password. They’re different. Also open System Settings > General > Sharing, click the i next to Remote Login, and confirm your user account appears in the allowed list.

Connected but can’t see all files The Allow full disk access for remote users toggle in System Settings > General > Sharing > Remote Login controls this. Enable it for unrestricted filesystem access over SSH.

Internet connection fails but local works fine Confirm your port forwarding rule is saved and active on the router, and double-check that you’re connecting to your public IP, not the local 192.168.x.x address. Residential public IPs can change after a router restart; if a connection that previously worked suddenly stops, that’s likely why.

Once Remote Login is on, you won’t need to touch the Mac’s settings again. Any Windows machine with a terminal can connect with one command.