How to Connect to Another Laptop via Wi-Fi: A Step-by-Step Guide for Windows, macOS, and Linux

Remote connection to another laptop via Wi-Fi — a challenge faced by both system administrators and regular users. The capabilities range from simple file transfers to full screen control: launching programs, adjusting settings, and even troubleshooting remotely. But how do you do it correctly to ensure a stable connection and secure data?

Many people mistakenly believe that such a connection requires a router or specialized software. In fact, there are built-in tools. Windows, macOS And Linux, as well as free utilities that perform just as well as their paid counterparts. The key is to choose the appropriate method based on your goals: whether you need file transfer, remote desktop, or terminal access.

In this article we will look at three main connection methods (with and without a router), we'll compare them in terms of speed, security, and setup complexity, and provide checklists for checking the connection. We'll pay special attention to common errors that can interrupt the connection, such as a firewall. Windows Defender or incorrect settings IP addresses.

1. Connect via the built-in Remote Desktop (RDP) in Windows

Protocol RDP (Remote Desktop Protocol) — standard solution from Microsoft, which allows you to control another computer as if you were sitting at it. This method is ideal for Windows Pro And Enterprise, but does not work in home editions (for example, Windows 10/11 Home). If this is the version you have, skip this section and go to TeamViewer or SSH.

To connect via RDP, both laptops must be on the same network (via a router) or connected directly via Wi-Fi (in remote mode). ad-hoc). Here are the step-by-step instructions:

  • 🖥️ On remote laptop (to which they connect): open Settings → System → Remote Desktop and enable the "Enable Remote Desktop" option. Remember the computer name (for example, DESKTOP-ABC123).
  • 🔒 In the Network Settings section, select Allow connections only from computers that use Network Level Authentication (this will increase security).
  • 🌐 On local laptop (from which you are connecting): launch the Remote Desktop Connection application (mstsc.exe) and enter the IP address or name of the remote PC.
  • 🔑 When connecting for the first time, enter the login and password for the remote laptop account.

If the laptops do not see each other, check:

  1. Is the firewall disabled on both devices (or add a port exception? 3389).
  2. Are they on the same subnet (for example, both have IP addresses like 192.168.1.x).
  3. Is File and Printer Sharing enabled in your network settings?

Is Remote Desktop enabled on the target PC?|Are both laptops on the same Wi-Fi network?|Is port 3389 open in the firewall?|Does the account have administrator rights?-->

⚠️ Attention: If you are connecting via the Internet (not a local network), you need to set up port forwarding (port forwarding) on the router. This is risky - attackers can scan open ports. Use VPN for protection.

2. Remote connection via TeamViewer (without a router)

TeamViewer — a universal solution for connecting to a laptop via Wi-Fi, which works on all operating systems (including macOS And Linux) and doesn't require complex settings. The advantage of this method is the ability to connect even if the laptops are on different networks (for example, one at home and one in a cafe).

How does this work:

  1. Download and install TeamViewer for both laptops (official website: teamviewer.com).
  2. On the remote laptop, run the program and record ID And password (they are updated at each launch).
  3. On your local laptop, enter this information in the "Partner ID" field and click "Connect."
  4. Confirm access on the remote device (if the confirmation option is enabled).

TeamViewer not only supports screen control, but also:

  • 📁 Transfer files between laptops (Files and Extras tab).
  • 🎤 Voice and video chat (useful for remote support).
  • 🖱️ "Quick connection" mode for temporary access without installation.

TeamViewer|AnyDesk|RDP (built into Windows)|SSH|Another option-->

⚠️ Attention: Free version TeamViewer Limits session time for commercial use (after 5 minutes, a window may appear prompting you to purchase a license). This isn't a big deal for personal use, but if you administer an office network, consider paid plans.

3. Connecting via SSH (for Linux and macOS, as well as Windows 10/11)

Protocol SSH (Secure Shell) SSH is designed for remote management via the command line. It's ideal for administrators who need terminal access (for example, to configure servers or run scripts). Unlike RDP, SSH doesn't provide a graphical interface, but it works on all platforms and is considered the most secure method.

To connect via SSH:

  1. On remote laptop (Linux/macOS): Enable SSH server:
    sudo systemctl enable --now ssh # For Linux (systemd)
    

    sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist # For macOS

    IN Windows 10/11 Install the "OpenSSH Server" component via Settings → Applications → Additional components.

  2. Find out the local IP address of the remote laptop (command ip a for Linux/macOS or ipconfig for Windows).
  3. On local laptop connect via SSH:
    ssh user@192.168.1.100

    Instead of user Specify the account name and the remote PC address instead of IP.

If the connection is not established, check:

  • 🔌 Is the port open? 22 in the firewall (on the remote laptop).
  • 📡 Are the devices on the same network (if not, use NGrok for tunneling).
  • 🔑 Is the password entered correctly (or use SSH keys for authentication).

4. Connection without a router (Wi-Fi Direct or ad-hoc)

If you don't have a router, you can connect your laptops directly via Wi-Fi Direct (for modern devices) or mode ad-hoc (for older operating systems). This method is suitable for file transfer or temporary remote access, but may be less stable than connecting via a router.

Method 1: Wi-Fi Direct (Windows 10/11 and macOS)

  1. On one of the laptops, open Settings → Network & Internet → Mobile Hotspot.
  2. Enable the "Allow using my internet connection" option (even if there is no internet).
  3. On the second laptop, connect to the created access point as if it were a regular Wi-Fi network.
  4. Now laptops are on the same network - use RDP, SSH or shared folders.

Method 2: Ad-hoc mode (for Windows 7/8 or Linux)

  1. Open Command Prompt as administrator and run:
    netsh wlan set hostednetwork mode=allow ssid=MyAdHoc key=12345678

    Here MyAdHoc — network name, 12345678 — password (minimum 8 characters).

  2. Start the network:
    netsh wlan start hostednetwork
  3. Connect the second laptop to the network MyAdHoc.
What to do if laptops don't see each other in ad-hoc mode?

Check if your Wi-Fi adapter supports the mode ad-hoc (some new adapters only work in the mode infrastructure). Also try disabling power saving for Wi-Fi in Device Manager (Adapter Properties → Power Management → Allow the computer to turn off to save power - uncheck the box).

⚠️ Attention: In mode ad-hoc Data transfer speeds may be lower than via a router due to protocol limitations. For stable operation, avoid large files and video streaming.

5. Setting up file and printer sharing

If you don't need full control of your laptop, but only file sharing, it's enough to set up public access via Wi-Fi. This works on both Windows and macOS/Linux (via Samba).

For Windows:

  1. On the laptop from which you will be distributing files, open Conductor, right-click on the folder and select Properties → Sharing.
  2. Click Share and add a user All with "Read" or "Read and Write" rights.
  3. In the Security section, configure permissions for the same group.
  4. On the second laptop, open Net In File Explorer, the name of the first PC will appear. Double-click it and enter your login and password (if required).

For macOS/Linux:

  • 🍎 On macOS: open System Preferences → Sharing and enable "File Sharing." Add the folder to the list and configure permissions.
  • 🐧 On Linux: install Samba (sudo apt install samba) and edit the config /etc/samba/smb.conf, adding a section for your folder.
OS Protocol Max. transfer rate Is a router required?
Windows SMB (Server Message Block) Up to 1 Gbps (in local network) No (works ad-hoc)
macOS AFP or SMB Up to 500 Mbps No
Linux Samba (SMB) Up to 1 Gbps No
Any OS FTP (via FileZilla) Up to 300 Mbps Yes (for external access)

6. Common mistakes and their solutions

Even with the correct settings, the connection may not work. Here the most common causes and how to eliminate them (data collected based on analysis of technical support forums):

  • 🔌 Error: "The remote computer is unavailable" (RDP).
    Solution: Check if Remote Desktop is enabled on the target PC and the port is open. 3389 in your firewall. If you're connecting via the internet, make sure port forwarding is configured on your router.
  • 🔒 TeamViewer asks to update its version.
    Solution: Update the program on both laptops. If the problem persists, uninstall it. TeamViewer clear the settings and install again.
  • 📡 Laptops cannot see each other on the same Wi-Fi network.
    Solution: Disable your antivirus (for example, Kaspersky or Avast may block network discovery). Also, check that both devices are on the same subnet (e.g. 192.168.1.x).
  • 🐢 Slow file transfer.
    Solution: If you use ad-hoc, switch to the router. Also try disabling encryption in the shared folder settings (but this will reduce security!).

If none of the methods worked, check:

  1. Are power saving modes disabled for the Wi-Fi adapter on both laptops?
  2. Are there any conflicting IP addresses (for example, both devices should not have the same IP address) 192.168.1.1).
  3. Is your ISP blocking the connection (some public Wi-Fi networks restrict P2P connections).

7. Security: How to secure your remote connection

Remotely connecting to a laptop is a potential vulnerability if you don't take precautions. Attackers can intercept traffic, guess your password, or even gain control of your device. mandatory steps for protection:

  • 🔐 Use complex passwords. For RDP and SSH, avoid simple combinations like 123456 or qwertyOptimally, a password of 12+ characters long, including letters, numbers, and special characters.
  • 🛡️ Enable two-factor authentication (2FA). IN TeamViewer This is done in your account settings. For SSH, set up keys instead of passwords.
  • 🌐 Avoid connecting via public Wi-Fi. If necessary, use VPN (For example, ProtonVPN or WireGuard).
  • 🔄 Update your software regularly. Vulnerabilities in older versions of RDP or SSH can be used for attacks (for example, exploit BlueKeep for RDP).

For maximum safety:

  1. Set up IP whitelist in the firewall to allow connections only from trusted addresses.
  2. Use non-standard ports for SSH/RDP (for example, 2222 instead of 22 for SSH).
  3. For permanent access, set up VPN server on the router (for example, OpenVPN or WireGuard).
⚠️ Attention: Never leave remote access enabled permanently unless absolutely necessary. Disable RDP/SSH or change passwords after finishing work. TeamViewerThis will reduce the risk of unauthorized access.

FAQ: Frequently Asked Questions

Is it possible to connect to a laptop via Wi-Fi if it is turned off?

No, the laptop must be turned on and connected to the network to connect remotely. However, some models (for example, Lenovo or Dell with technology Wake-on-LAN) can be "wake up" over the network if they are in sleep mode. To do this, you need to:

  1. Turn on Wake-on-LAN in BIOS.
  2. Set up a static IP address for your laptop.
  3. Send a "magic packet" from another device (for example, via a utility WakeOnLan).

Please note: Wi-Fi adapters rarely supported Wake-on-LAN - usually it only works via cable Ethernet.

How to connect to a macOS laptop from Windows (and vice versa)?

For cross-platform connection use:

  • TeamViewer/AnyDesk — a universal solution that works without any additional settings.
  • SSH - if terminal access is needed. macOS SSH server is enabled by default (configure in System Preferences → Sharing). IN Windows install OpenSSH server.
  • VNC — for the graphical interface. On macOS Enable "Remote Control" in the sharing settings, and on Windows use TightVNC or RealVNC.

To exchange files between macOS And Windows the easiest to use SMB (V macOS connect via Finder → Go → Connect to Server, enter smb://IP-address-of-PC).

Why do I get a black screen or the error "Remote session disconnected" when connecting via RDP?

This is problematic for several scenarios:

  • Video drivers: Update the graphics card drivers on the remote PC (especially relevant for NVIDIA And AMD).
  • RDP licenses: IN Windows Pro Sometimes temporary licenses get reset. Restart both laptops.
  • Group policies: If the laptop is in a domain, the administrator may have restricted RDP. Check through gpedit.msc → Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services.
  • IP conflict: If both laptops have the same IP, RDP won't work. Check via ipconfig.

If the problem persists, try connecting via TeamViewer or AnyDesk - They often bypass RDP restrictions.

How to transfer files between laptops as quickly as possible?

The transfer speed depends on the method:

Method Speed Reliability Difficulty of setup
Shared Access (SMB) ⚡⚡⚡⚡ (up to 1 Gbps) ✅ High ⭐⭐ (simple)
FTP server ⚡⚡⚡ (up to 500 Mbps) ✅ Average ⭐⭐⭐ (software needed)
TeamViewer (file transfer) ⚡⚡ (up to 200 Mbps) ✅ High ⭐ (very simple)
Wi-Fi Direct ⚡⚡ (up to 150 Mbps) ❌ Low (frequent interruptions) ⭐⭐ (average)

For maximum speed:

  1. Use Ethernet cable (if possible) - it is always faster than Wi-Fi.
  2. If it's only Wi-Fi, connect via a router at a frequency 5 GHz (and not 2.4 GHz).
  3. Disable encryption during transfer (in the shared folder settings) if the files are not confidential.
Is it possible to control a laptop via Wi-Fi from a phone?

Yes, the following will work for this:

  • TeamViewer QuickSupport (Android/iOS) - allows you to control your PC from your phone.
  • Microsoft Remote Desktop (Android/iOS) - for connection via RDP.
  • VNC Viewer — if a VNC server is configured on the laptop.

Restrictions:

  • Control from a phone is inconvenient for complex tasks (for example, video editing).
  • Some applications (such as games) may not display correctly.
  • For iPhone will be required TeamViewer or AnyDesk — the built-in RDP client only works with Windows.