Report this

What is the reason for this report?

port 22: Connection timed out

Posted on August 24, 2015

Today, I have established a droplet succesfully. The information: 162.243.159.46 512MB Ram 20GB SSD Disk San Francisco 1 CentOS 6.7 x64

Gateway: 162.243.152.1

However, when I try ssh root@162.243.159.46 The error occurred: ssh: connect to host 162.243.159.46 port 22: Connection timed out

Also, when I try ping 162.243.159.46 It failed to connect to the server

But, I can connect to the gateway. ping 162.243.152.1 is successful.

How can I solve this problem.

Thanks very much.

Best wishes

Zaixu



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

The problem is MTU related try setting your client’s network card mtu smaller for example

ifconfig enp10s0 mtu 1000 (linux)

thanks a lot for : run $sudo ufw allow 22

Hello! I had the same problem and it persists even after enabling port 22 in the firewall.

In my case (I estimate that for having too many ssh keys) I had to initialize the ssh agent and add the key “manually”. And it worked.

The steps I followed were:

To initialize the ssh agent

eval $ (ssh-agent -s)

To add the key

ssh-add -i ~ / .ssh / key

— If your password has a paraphrase, you should insert it — In my case, the key was in the ~ / .ssh / directory and was called “key”, check the names of your files and replace them.

To enter the Droplet via ssh

ssh -i ~ / .ssh / key root @ droplet-ip

— It is important to add the argument “-i” to the ssh command and tell it the full path where your key is located — Then you can indicate with which user and to which IP you will connect

I hope it works for you too.

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.