I've read many SSH connection refused posts on here and will continue to pour through them after writing, but instead of blindly trying each solution hoping it works out for my computer, thought I'd write out my troubleshooting solving process.
Goal: use ssh to root log into my server
Problem:
$ ssh [email protected]
ssh: connect to host 123.456.78.911 port 22: Connection refused
Context
Server: Digital Ocean (Virtual Machine - the $5 a month deal)
OS: Windows 10, Linux Subsystem, Ubuntu Bash, Linux Subsystems
OpenSSH - client and server both installed
Firewall - SSHD added to allowances (both in and out)
Troubleshooting Process
Edit: adding verbose mode output
ssh -v [email protected]
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to xxx.xxx.xx.xxx [xxx.xxx.xx.xxx] port 22.
debug1: connect to address xxx.xxx.xx.xxx port 22: Connection refused
ssh: connect to host xxx.xxx.xx.xxx port 22: Connection refused
Leads
I've connected to my server on this computer before, but had to factory reset earlier this month. Had trouble the first time and I can't remember how I solved it (this was a year ago). I'm pretty sure ssh is enabled on the DO server side, so my guess is that the private and public keys are misplaced and I have to change a file path somewhere. I remember there was an issue with file locations using Ubuntu in Windows.
Do I have to add the public and private keys to some other authorization file? or key location?




