@mrus@merveilles.town suggested
maybe their installation does a network restart or something odd, even though that shouldn’t impact the SSH connection. Try using their web console and see how far you get there maybe?
Using the DigitalOcean web console solved my problem. I think my internet connection is not great and it causes problems generally with ssh, nothing to do with DigitalOcean or Discourse.