beginner

The Remote Access Landscape: Choosing the Right Method

A map of every common way to reach another machine, from SSH and Remote Desktop to VPNs and mesh networks, with the ports each one uses, what each is good for, and the questions that decide which to use.

45 min

1. What “remote access” really means

Remote access is any way of using a computer, or a network device, that you are not physically at. There are only a few kinds of access, and almost every tool you will meet is one of them:

Kind What you get Typical tools
Command line A text shell on the other machine SSH, Telnet, PowerShell remoting, serial console
File transfer Copy files to and from it SFTP, SCP, rsync, FTP, FTPS, Robocopy
Remote desktop See and control the screen RDP, VNC, AnyDesk, TeamViewer, Quick Assist
Network access Be “on” the remote network VPN (WireGuard, OpenVPN, IPsec), mesh VPN (Tailscale)
Out-of-band Reach a machine that is off or broken IPMI, iDRAC, iLO, serial console, Wake-on-LAN
Tunnels Carry another connection safely SSH port forwarding, reverse tunnels

The same job can often be done several ways. The skill is choosing the simplest and safest one.

2. The protocols and their ports

Learn this table. It appears in firewall rules, scan results and incident reports.

Service Port Encrypted? Notes
SSH, SFTP, SCP TCP 22 Yes One port carries shell, file transfer and tunnels
Telnet TCP 23 No Passwords sent in clear text. Avoid
FTP TCP 21 (+ data) No Passwords and files in clear text. Avoid
FTPS TCP 21 / 990 (+ data) Yes (TLS) FTP wrapped in TLS
RDP TCP and UDP 3389 Yes Windows Remote Desktop
VNC TCP 5900 and up Usually not Needs a tunnel or VPN around it
WinRM (PowerShell remoting) TCP 5985 (HTTP), 5986 (HTTPS) Yes (message level) Windows management
WireGuard UDP 51820 (default) Yes Modern VPN
OpenVPN UDP or TCP 1194 Yes Widely supported VPN
IPsec / IKE UDP 500 and 4500 Yes Built into many routers and clients
IPMI UDP 623 Weak by default Keep on a private management network

3. Five questions that choose the method

Before you open anything, answer these:

  1. What is the task? A one-off command, ongoing administration, a file copy, or watching someone’s screen?
  2. What is on each end? Windows, Linux, macOS, Android, a router? Each has a native tool.
  3. Who is the user? You (an administrator) or a non-technical person who needs to approve a session?
  4. Where are the two ends? On the same network, across the internet, or behind NAT with no ability to forward ports?
  5. What is the risk? What could an attacker do with this door if they found it?

Worked examples

Situation Good choice Why
Patch a Linux web server SSH with keys Native, scriptable, one open port
Reset a user’s password on their Windows laptop at home A remote-support tool, or Quick Assist The user approves; no router changes
Manage 40 Windows servers PowerShell remoting Run one command on all of them
Copy nightly backups to a remote box rsync over SSH Efficient, resumable, encrypted
Reach the office file server from home VPN (WireGuard or Tailscale) You are “on” the network, so every service works
Fix a server that will not boot IPMI/iDRAC or serial console The operating system is not running
Show a web app on your laptop to a colleague SSH reverse tunnel or a mesh VPN No firewall changes

4. The golden rules (the rest of the course expands each one)

  • Never expose a management service to the whole internet if you can put it behind a VPN or a bastion.
  • Use keys or certificates, not passwords, wherever the tool allows.
  • Add a second factor for anything powerful.
  • Give each person their own account, so logs mean something.
  • Log it and look at the logs.
  • Remove access the day a person leaves or a laptop is lost.
  • Keep the software updated. Remote services are exactly where attackers look for unpatched flaws.

5. Hands-on lab: write the decision rule

Turn the decision table into code, the way a support team might build a “which tool?” helper. Return exactly one of: "ssh", "rdp", "support-tool", "vpn", "out-of-band".

Pick the remote access method — Python 3
WHAT TO DO
choose_method(target_os, need) returns one of: "ssh", "rdp", "support-tool", "vpn", "out-of-band" target_os is "linux", "windows" or "any" need is one of: "shell" a command line on a machine you administer "desktop" the full desktop of a machine you administer "assist" help a non-technical person who must approve the session "network" use many services on a remote network "dead" the operating system is not running Rules: - dead -> out-of-band (whatever the OS) - network -> vpn - assist -> support-tool - shell -> ssh - desktop on windows -> rdp - desktop on linux -> ssh (we tunnel a desktop over SSH, covered later)
YOUR CODE (edit here, then press Run)
Ctrl/⌘ + Enter
OUTPUT

6. Key takeaways

  • Remote access comes in a few kinds: command line, file transfer, desktop, network, out-of-band, and tunnels.
  • Know the default ports: SSH 22, Telnet 23, FTP 21, RDP 3389, VNC 5900, WinRM 5985/5986, WireGuard 51820.
  • Choose by task, platform, user, location and risk.
  • Telnet and plain FTP are unencrypted. SSH, SFTP, RDP, WinRM and VPNs are encrypted, but still need strong authentication and limited exposure.
  • Never expose a management service to the whole internet when a VPN or bastion will do.
A small business wants staff to open RDP to the office PCs from home. The owner suggests forwarding port 3389 on the office router. What do you recommend instead?

Do not forward 3389. Put a VPN (WireGuard, or a mesh VPN such as Tailscale) in front so staff first join the private network, then use RDP to the internal address. If you need a gateway, use a Remote Desktop Gateway with multi-factor authentication. Either way the RDP port is never reachable from the open internet, and each person has their own account.

Can You Explain It?

Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.

  • Explain the difference between a remote shell, a remote desktop and a VPN to someone who only uses a phone.
  • Why is a remote-support tool often a better choice than port forwarding for helping a family member?
  • Name three of the golden rules and give one example of breaking each.

🧪 Want to practise this on your own computer? See how to set up your lab →

📝

Knowledge Check

1 of 4

You need to run commands and edit config files on a Linux server in another country. Which method is the usual first choice?

Official References

Report a problem

About: /lessons/remote-access-landscape-and-choosing-a-method