Oracle Cloud Instance connectivity issue

喜欢而已 提交于 2021-01-28 05:22:43

问题


I am inexperienced in cloud. I have created a compute instance in Oracle Cloud. But when I try to ssh to it using the public i/p, it says 'cannot connect to host port 22: operation timed out'. I have created a public i/p for the instance and provided the public key. All the other options are set to default. Can anyone please help?


回答1:


You need to check if you have an Internet Gateway and Route Table with the right rule deployed within your VCN and also check if you have opened the TCP 22 port in the Security List assigned to your subnet (or you have to create a Network Security Group assigned to the VNIC). You can find the details in this guide. If everything is set and you are still unable to ssh, you might have a firewall within your instance. You can check it with either firewall-cmd or iptables depending on your linux.




回答2:


The Oracle instance that was deployed in my case already had everything set to access via SSH (except for the public-key that needs to be added in the authorized_keys file).

As Isarecz answered, you need to check the other possible access entry points.

In my case the Virtual Cloud Network already had the correct Ingress in the Security List for the instance's Subnet.

But the instance had Oracle Linux already configured with iptables, so you might need to check that,

iptables -L

(the firewall command might differ, if the OS is not the same)

and ensure that you have a rule for allowing SSH on the port 22 (in this case: with any IP or interface):

iptables -A INPUT -p tcp –dport 22 -j ACCEPT -m comment --comment "Allow SSH access on port 22"


来源:https://stackoverflow.com/questions/61375652/oracle-cloud-instance-connectivity-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!