CodexBloom - Programming Q&A Platform

OCI Bastion Host: SSH Connection Timing Out with Custom Security Rules

๐Ÿ‘€ Views: 1 ๐Ÿ’ฌ Answers: 1 ๐Ÿ“… Created: 2025-06-11
oci bastion-host ssh networking bash

I've been researching this but I'm trying to configure I'm trying to figure out I'm following best practices but I'm having trouble connecting to an OCI Bastion Host using SSH... I've set up the Bastion Host according to the documentation, but every time I try to connect, the SSH session times out after about 30 seconds. I confirmed that the Bastion Host is up and running, and the public IP address seems correct. Hereโ€™s my SSH command: ```bash ssh -i /path/to/private_key opc@<bastion-public-ip> ``` Iโ€™ve allowed inbound traffic on port 22 in the Bastion Host's security list, and I made sure that the security rules for the private subnet where my resources are located allow traffic from the Bastion Hostโ€™s IP. However, Iโ€™m still unable to connect. I also checked the logs on the Bastion Host and see the following behavior: ``` sshd[1234]: Connection closed by <client-ip> port 22 ``` I suspect there might be a misconfiguration either in my security lists or the network access control list (NACL) associated with the private subnet. Can anyone confirm if there are any additional rules I should consider or if I've missed something when configuring the Bastion Host? I'm currently using OCI's official SDK version 3.0 for my setup, and the Bastion Host is running Oracle Linux 8. This is for a web app running on Ubuntu 20.04. Thanks for taking the time to read this! My team is using Bash for this mobile app. I appreciate any insights! I'm on Linux using the latest version of Bash. What's the correct way to implement this? For reference, this is a production REST API. Any advice would be much appreciated.