Ssh connection refused

So im new to this and had been working my way through the linux fundamentals course, unfortunately today my instance expired so I am unable to continue the course. I downloaded parrot OS and installed it on VMware, got it up and working but when I try to ssh into the htb-student account it errors stating

ssh: connect to host 10.129.58.185 port 22: Connection refused

Ive tried uninstalling ssh and reinstalling it as other posts around google mentioned but nothing seems to work. I just want to be able to continue the course material but this roadblock seems to be preventing that and id rather not have to rely on the 1 instance you get daily to do the courses on HTB.

Sorry if this has been posted before I cant seem to figure out the solution, thank you in advance to anyone that can provide assistance with this issue.

Just a couple of troubleshooting checks.

Are you connected to the VPN? If so, can you ping that IP address?

systemctl status openvpn@academy-regular.ovpn
â—Ź openvpn@academy-regular.ovpn.service - OpenVPN connection to academy-regular.>
Loaded: loaded (/lib/systemd/system/openvpn@.service; disabled; vendor pre>
Active: activating (auto-restart) (Result: exit-code) since Sat 2022-06-25>
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 14987 ExecStart=/usr/sbin/openvpn --daemon ovpn-academy-regular.ov>
Main PID: 14987 (code=exited, status=1/FAILURE)
CPU: 9ms
lines 1-9/9 (END)

this is what I get when trying to connect to openvpn, it doesnt seem to want to start and gets stuck in this activating process. followed the instructions on the HTB vpn section and downloaded the .ovpn file and moved it with the other vpn files but then this is where it gets stuck.

also this is the error when i try to start openvpn

systemctl start openvpn@academy-regular.ovpn
Job for openvpn@academy-regular.ovpn.service failed because the control process exited with error code.
See “systemctl status openvpn@academy-regular.ovpn.service” and “journalctl -xeu openvpn@academy-regular.ovpn.service” for details.

I’m not familiar with trying to connect as a service. Usually when you download the connection pack it has a file in it and you just execute that file with the openvpn program.

sudo openvpn yourconnectionfile

Can you do something like that?

With the systemd you try to start an OpenVPN server.

You need to start an OpenVPN client. Try sudo openvpn academy-regular.ovpn (or no sudo if you are root). See:

$sudo openvpn academy-regular.ovpn
Options error: In [CMD-LINE]:1: Error opening configuration file: academy-regular.ovpn
Use --help for more information.

this is what it outputs, the file is in the openvpn/server folder

Finally got it working! as a newbie I did not understand that linux is a multiprocessing os, this meant that every time I had tried to access openvpn it created a new process so there were multiple running causing conflictions.

killed all openvpn processes - retried starting openvpn - it worked!

thank you all very much for the assistance! really appreciate the help and ive now learned some things along the way.

2 Likes