I am using a kali Linux Virtual machine on Windows. ssh connect to host ... port 22: connection refused
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.
One option would be configuring the SSH server to listen on port 443. Some proxies do not actually inspect the packets that are going through and just filter traffic based on the target port. Port 443 is used for HTTPS traffic, so such proxies will definitely allow it. If you are willing to sacrifice the possibility of hosting an HTTPS website on your Droplet, you can give that a shot. To do so:
/etc/ssh/sshd_config
in a text editor# Port 22
by deleting the#
and replace22
with443
.sudo systemctl restart ssh
That’s not the best option but it’s the quickest and easiest to set up. Another route would be setting up a VPN, but again, that also depends on how your proxy works. If it actually inspects packets and blocks VPNs, there’s not much you could do:
The university I go to blocks OpenVPN, but not IKEv2 which Also uses. So, I’d recommend spinning up a new Droplet to experiment with different methods and figure out what works best for you.