Question

SSH Connection FROM droplet to external machine

Hi all, I’m trying to set up a cloud Nagios solution and am wanting to have tests running that check the connection speed over ssh. however no ssh connection I try to make from the droplet is getting anywhere, they hang immediately and eventually time out. there’s no log on the receiving servers about the attempts either. I have a suspicion that there is a firewall rule outside of my control that blocks this. but I want to make sure. Does anyone have any information?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
January 13, 2023

Hello @brandongunderson

This sounds like a Firewall issue, follow the suggestion by Bobby and see if outgoing tcpand udp connections are blocked.

If you’re planning on using Nagios you’ll need to have a custom Firewall configuration, using ufw is an option, but this can be modified according to your needs.

We do have an article that covers the process of installing Nagios 4 on an older version of Ubuntu but you can still use it as a reference point.

https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-18-04

Regards

Bobby Iliev
Site Moderator
Site Moderator badge
January 13, 2023

Hi there,

What I could suggest is making sure that the outbound connections from your Droplet itself are not being blocked, you could do that with a quick telnet test to PortQuiz:

telnet portquiz.net 22

If the connection is successful this will verify that the problem is not with the Droplet itself but the server that you are trying to SSH to.

If the above telnet command fails, the it means that it is a firewall on your Droplet or a Cloud Firewall that the Droplet is attached to, that is blocking the outbound TCP connections.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel