iac.htora.dev · security templates

Home/Refreshers/Shell access without opening a port: refresher

Shell access without opening a port

Reach a server for troubleshooting with nothing listening on the internet, and a recording of the session.

Remember

  1. You ask for a shell: from the command line.
  2. The broker checks who you are: the server has no open port.
  3. The session runs through the broker: on an encrypted channel.
  4. A transcript is saved: somewhere you can audit it.
PlatformUsesThe part that catches people
AWSSSM Session Manager logging to S3 and CloudWatchThe preferences live in one document per account and region, named SSM-SessionManagerRunShell.
AzureAzure Bastion, with every connection recordedBastion needs a subnet named AzureBastionSubnet, /26 or larger.
Google CloudIdentity-Aware Proxy TCP forwarding with audit logsIAP records who opened a tunnel, to which VM and port, and when.
Oracle CloudOCI Bastion with managed SSH sessionsBastion does not record what is typed.

Run the quick start

Download providersterraform init
Previewterraform plan
Applyterraform apply

Watch out

  • Nothing listens on the internet.
  • Every session is tied to a cloud identity, so access ends when that identity is disabled, with no SSH keys left behind on the machines.
Check it worked

Open a session. Confirm there is no inbound rule and the transcript was saved.

Read the full pageDownload PDF

Registry 0.23.0. Built 2026-11-17.

Made by Habibullah Tora. Source on GitHub. Code under the MIT licence, writing under CC BY 4.0.