Introduction
Connecting to a remote Windows or Linux server can be done in several ways depending on the client operating system, the server operating system, the network design, and the security requirements. This guide explains the most common and practical methods for connecting from macOS, Windows, Linux, and directly from the AWS Management Console.
The main connection methods are:
- SSH for Linux command-line access
- RDP for Windows graphical desktop access
- AWS Systems Manager Session Manager for browser or CLI access without opening inbound ports
- AWS Fleet Manager Remote Desktop for Windows desktop access in a browser
- SSM port forwarding for secure RDP, database, and internal application access
- EC2 Instance Connect for browser-based or short-lived SSH access to Linux
- Bastion or jump hosts for traditional private-network access
- VPN or Direct Connect for private enterprise connectivity
Quick decision table
| Source | Target | Recommended method | GUI or CLI |
| macOS | Linux EC2 | Session Manager or SSH | CLI |
| macOS | Windows EC2 | Fleet Manager or RDP through SSM | GUI |
| Windows | Linux EC2 | Session Manager, PowerShell SSH, or PuTTY | CLI |
| Windows | Windows EC2 | Fleet Manager or Remote Desktop | GUI |
| Linux | Linux EC2 | Session Manager or SSH | CLI |
| Linux | Windows EC2 | Remmina, FreeRDP, or Fleet Manager | GUI |
| AWS Console | Linux EC2 | Session Manager or EC2 Instance Connect | Browser shell |
| AWS Console | Windows EC2 | Fleet Manager Remote Desktop | Browser desktop |
1. Connect from macOS to a Linux EC2 instance
Option A: AWS Systems Manager Session Manager
Session Manager is usually the safest option because it does not require a public IP address, an inbound SSH rule, or a private SSH key. The EC2 instance must have SSM Agent running, an IAM role with AmazonSSMManagedInstanceCore , and network connectivity to Systems Manager.
aws sso login --profile kaushik-lab aws ssm start-session \ --target i-0123456789abcdef0 \ --profile kaushik-lab \ --region us-east-1You can also connect from the AWS Console:
EC2 → Instances → Select instance → Connect → Session Manager → ConnectOption B: Traditional SSH
Use SSH when the instance has a reachable IP address or when you are connected through a VPN, bastion, or private network.
chmod 400 my-key.pem ssh -i my-key.pem ec2-user@203.0.113.10For Ubuntu:
ssh -i my-key.pem ubuntu@203.0.113.102. Connect from macOS to a Windows EC2 instance
Option A: Fleet Manager Remote Desktop
Nothing needs to be installed on macOS. Open a browser and navigate to:
AWS Console → Systems Manager → Fleet Manager → Managed nodes → Select Windows instance → Node actions → Connect with Remote DesktopFleet Manager opens the Windows desktop in the browser. It avoids exposing RDP port 3389 directly to the internet.
Option B: Windows App or Microsoft Remote Desktop through SSM
For a native desktop experience, install the Microsoft Windows App on macOS, then create an SSM tunnel:
aws ssm start-session \ --target i-0123456789abcdef0 \ --document-name AWS-StartPortForwardingSession \ --parameters '{"portNumber":["3389"],"localPortNumber":["13389"]}' \ --profile kaushik-lab \ --region us-east-1Keep the terminal open and connect the RDP client to:
PC name: localhost:13389 Username: Administrator Password: Windows Administrator passwordOption C: Traditional RDP
This requires a public IP or private network path and an inbound security group rule for TCP 3389 from a restricted source IP.
Windows App / Microsoft Remote Desktop PC name: public-or-private-ip:3389This method is simple but less desirable when RDP is exposed directly to the internet.
3. Connect from Windows to a Linux EC2 instance
Option A: Session Manager
Install AWS CLI v2 and the Session Manager plugin, then run:
aws sso login --profile kaushik-lab aws ssm start-session --target i-0123456789abcdef0 --profile kaushik-lab --region us-east-1Option B: PowerShell SSH
Recent Windows versions include the OpenSSH client:
ssh -i C:\Keys\my-key.pem ec2-user@203.0.113.10Option C: PuTTY
PuTTY can be used for SSH access. If the private key is in PEM format, convert it to PPK using PuTTYgen before connecting.
4. Connect from Windows to a Windows EC2 instance
Option A: Fleet Manager
Open Fleet Manager from a browser and launch the Windows desktop without opening RDP to the internet.
Option B: Remote Desktop Connection
Open mstsc and enter the EC2 public IP, private IP over VPN, or an SSM-forwarded localhost port.
Computer: localhost:133895. Connect from Linux to a Linux EC2 instance
Option A: Session Manager
aws ssm start-session \ --target i-0123456789abcdef0 \ --profile kaushik-lab \ --region us-east-1Option B: SSH
chmod 400 my-key.pem ssh -i my-key.pem ec2-user@203.0.113.106. Connect from Linux to a Windows EC2 instance
Option A: Fleet Manager
Use any supported browser to open the Windows desktop from Fleet Manager.
Option B: Remmina or FreeRDP
Create the SSM tunnel:
aws ssm start-session \ --target i-0123456789abcdef0 \ --document-name AWS-StartPortForwardingSession \ --parameters '{"portNumber":["3389"],"localPortNumber":["13389"]}' \ --profile kaushik-lab \ --region us-east-1Then connect Remmina or FreeRDP to localhost:13389 .
7. Connect from the AWS Console
Linux: Session Manager
Join the discussion
0 CommentsAsk questions, add context, or share what worked.
More from Melochip Editorial
Learn what Playwright testing is, why modern QA teams use it, how testers can get started, and the major types...
7 min read · Sep 19, 2026
Learn how Kubernetes Deployments and ReplicaSets work with practical YAML, scaling, self-healing, rolling upda...
7 min read · Sep 17, 2026
Learn Kubernetes security best practices with RBAC, Secrets, ServiceAccounts, Pod securityContext, NetworkPoli...
6 min read · Sep 17, 2026Related articles
Learn Linux from the ground up with simple explanations of the kernel, distributions, filesystem, commands, pe...
4 min read · Updated Oct 1, 2026
Learn what Playwright testing is, why modern QA teams use it, how testers can get started, and the major types...
7 min read · Sep 19, 2026
Learn how Kubernetes Deployments and ReplicaSets work with practical YAML, scaling, self-healing, rolling upda...
7 min read · Sep 17, 2026
Learn Kubernetes security best practices with RBAC, Secrets, ServiceAccounts, Pod securityContext, NetworkPoli...
6 min read · Sep 17, 2026Stay in the loop. Get new Melochip articles
Receive Melochip article updates when new articles are available. Explicit opt-in only.
No comments yet. Start the discussion.