Keep cloud workload administration private: secure SSH and RDP access
To administer virtual machines without exposing SSH or RDP directly to the internet, use an identity-aware session proxy or a private VPN path. AWS Systems Manager Session Manager and Google Cloud IAP TCP forwarding can relay sessions to VMs without public IPs; Azure Bastion forwards SSH/RDP to a VM’s private IP. However, “the VM has no public IP” does not mean “every hop from the administrator’s device stays on a private network.” Define the privacy boundary first.
Keep cloud workload administration private: secure SSH and RDP access
To administer virtual machines without exposing SSH or RDP directly to the internet, use an identity-aware session proxy or a private VPN path. AWS Systems Manager Session Manager and Google Cloud IAP TCP forwarding can relay sessions to VMs without public IPs; Azure Bastion forwards SSH/RDP to a VM’s private IP. However, “the VM has no public IP” does not mean “every hop from the administrator’s device stays on a private network.” Define the privacy boundary first.
Here, administrative traffic means an operator’s SSH, RDP, or similar management session into a VM. It does not mean a workload calling a managed cloud service API; that is a separate networking topic. Official AWS, Azure, and Google Cloud documentation was reviewed on November 22, 2026. No account was accessed or configured.
What access patterns can you choose?
| Pattern | Public management port on VM | How the administrator connects | Suitable for and caveats |
|---|---|---|---|
| AWS Systems Manager Session Manager | No inbound SSH/RDP rule is needed | The operator authenticates through AWS console/CLI and IAM; SSM Agent opens the session channel. Private instances can use Systems Manager interface VPC endpoints. | Central IAM and session controls without SSH keys or a jump host. Nodes need SSM Agent, an instance role, and HTTPS 443 egress or private endpoints. Session content logging has limitations for SSH and port-forwarding sessions. |
| Azure Bastion | Target VM needs no public IP | The administrator connects to Bastion from a browser or supported SSH/RDP client; Bastion connects to the VM’s private IP inside the VNet. | Useful for VM access across VNets/hub-spoke designs. Typical dedicated Bastion deployments require a public IP on Bastion itself; Premium private-only deployment can avoid one. An hourly SKU charge may apply even when idle. |
| Google Cloud IAP TCP forwarding | Target VM needs no external IP | The user creates an IAM-authorized encrypted HTTPS tunnel, which forwards to a chosen TCP port on the VM’s internal IP. | Fine-grained access to users and target VMs. Firewall ingress should allow only the documented IAP source range and required ports. Remove broad default SSH/RDP rules separately; enabling IAP does not block direct access by itself. |
| Client VPN | VM can remain private | The administrator device authenticates into the VPC/VNet and connects to the VM’s private address. | Useful when administrators need more than SSH/RDP, such as databases or internal web tools. Network access can be broad, so constrain routes, groups, device posture, and MFA. |
| Time-limited port opening (JIT) | A public port may be open temporarily | An approved request creates a short-lived firewall allowance, then closes it. | Can reduce exposure while keeping existing tools, but is not equivalent to a private tunnel: a public inbound path exists during the window. |
These patterns do not provide one identical level of privacy. Specify whether the requirement is to remove the VM’s public IP, close all public inbound management ports, keep the intermediary private too, or keep the administrator’s path on a corporate private network.
Where is the private boundary in each provider?
AWS Session Manager lets the managed node initiate its connection through SSM Agent, so operators can connect without opening inbound SSH/RDP on the node. A private-subnet node needs a route to required HTTPS endpoints, through NAT or Systems Manager interface endpoints. IAM policies control which people can start sessions to which nodes. CloudTrail records Session Manager API calls; session output can be sent to S3 or CloudWatch Logs. AWS documents an important exception: session content logging is unavailable for SSH and port-forwarding sessions, so decide whether a standard shell session is needed for command auditing.
Azure Bastion carries the administrator’s SSH/RDP connection over TLS to Bastion, then reaches the target VM by private IP. This removes the need for a public IP on the VM, but the standard dedicated Bastion architecture generally has its own public IP. Azure documents a Premium private-only option that also removes Bastion’s public IP; administrators then need a private route, such as VPN or dedicated connectivity, to reach it. Bastion can incur hourly SKU charges plus outbound data transfer.
Google Cloud IAP TCP forwarding wraps SSH/RDP and other TCP management sessions in an encrypted HTTPS tunnel and forwards them to the VM’s internal IP. IAM controls who can create tunnels and which VMs they can reach. The firewall must allow the documented IAP IPv4 range 35.235.240.0/20 only on required ports (check Google’s current separate range for IPv6). IAP does not automatically block direct connections, so remove or narrow any default firewall rule that allows SSH/RDP from all sources. IAP TCP forwarding is a management tunnel, not a feature for load-balanced targets.
“Private” can mean that the VM has no direct public management path, while the administrator still reaches a provider-managed proxy over HTTPS. If policy requires every management packet to traverse a corporate VPN, verify the route from the administrator device to the proxy as well; do not infer that requirement from the VM’s private IP alone.
How do you build the path without public inbound ports?
**Name the target and protocol.** Separate Linux shell (SSH), Windows desktop (RDP), and any other management TCP ports. Decide whether administrators need one or two VMs or broad access to internal services.
**Write down the privacy boundary.** Decide whether to remove VM public IPs, close all public inbound management rules, keep the intermediary private too, and require administrator devices to use a corporate network or VPN.
**Choose the entry point.** For VM sessions, compare Session Manager, Azure Bastion, and IAP. For broad private-network access, consider client VPN. Treat JIT as temporary exposure reduction, not as a private tunnel.
**Narrow identity and privilege.** Use individual identities, strong authentication/MFA, least privilege, specific VM/group scope, and expiring elevation. Avoid shared SSH keys or project-wide administrator grants as the normal path.
**Match firewall rules to the chosen entry point.** Allow only the proxy or VPN source to the required port; check that no `0.0.0.0/0` or `::/0` management rule remains. Verify AWS SSM egress, Azure Bastion subnet/SKU requirements, or Google IAP source ranges and ports.
**Define auditing and recovery.** Decide who can connect, which sessions are recorded, what tunnel types have logging exceptions, where logs are stored, and how long they remain. Document an approved fallback path and how emergency access is removed afterward.
**Validate in non-production.** Confirm the intended administrator can connect without VM public IP or direct public ingress, unauthorized identities are denied, and logs/alerts behave as intended. Test failure of the proxy, agent, VPN, or private endpoint before relying on it in production.
What should you check when a connection fails?
**AWS Session Manager does not show the node:** check SSM Agent state/version, instance role permissions, supported OS, and outbound HTTPS 443 to `ssm`, `ssmmessages`, and where required `ec2messages`. For private subnets, check NAT or VPC endpoint DNS, routes, and security groups.
**Azure Bastion cannot reach the VM:** check the private address, VNet peering/routes, `AzureBastionSubnet` and SKU requirements, network security rules, the VM’s SSH/RDP service, and the user’s VM login rights. Bastion access and VM login authorization can be separate permissions.
**Google IAP tunnel fails:** check IAP tunnel permissions, firewall source range and target port, VM OS Login or SSH/RDP permissions, and corporate proxy requirements. Also look for default SSH/RDP rules that still allow direct access.
**VPN connects but one VM is unreachable:** check overlapping address ranges, advertised routes, security rules, host firewall, DNS, and target port separately. A successful VPN connection does not authorize access to every internal resource.
Official documentation
[AWS Systems Manager Session Manager overview and session logging](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html)
[AWS Session Manager prerequisites and endpoint connectivity](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html)
[Azure Bastion overview, SKUs, and connection methods](https://learn.microsoft.com/en-us/azure/bastion/bastion-overview)
[Azure developer and administrator access to VMs](https://learn.microsoft.com/en-us/azure/networking/design-guide/developer-admin-access)
[Google Cloud IAP TCP forwarding setup and firewall rules](https://docs.cloud.google.com/iap/docs/using-tcp-forwarding)
[Google Cloud IAP TCP forwarding behavior and limits](https://docs.cloud.google.com/iap/docs/tcp-forwarding-overview)
Provider behavior reflects official documentation checked November 22, 2026 and may change. Verify current regional, OS, SKU, agent, and endpoint requirements before deployment. No access path was configured or tested in an account.