ansible-openvpn-hardened icon indicating copy to clipboard operation
ansible-openvpn-hardened copied to clipboard

Cannot connect to SSH once on VPN

Open TechFanDan opened this issue 7 years ago • 4 comments

Per the documentation, I used the following command:

ssh [created_user]@10.9.0.1

I keep getting:

ssh: connect to host 10.9.0.1 port 22: Connection refused

Any ideas?

TechFanDan avatar Jan 07 '18 00:01 TechFanDan

Sorry, for some reason, sshd hadn't started. Once I started it, it was all fine. Although, I'm wondering why it hadn't started to begin with - it was starting up prior to running this playbook.

Edit: Virtualbox VM in this case, and used the available terminal to make the changes.

TechFanDan avatar Jan 07 '18 14:01 TechFanDan

Running journalctl:

error: Bind to port 22 on 10.9.0.1 failed: Cannot assign requested address. fatal: Cannot bind any address

However, if I start it manually using the Virtualbox console window, it's fine.

Edit: Screenshot of journalctl, pink highlights for openvpn entries. These lead me to believe that OpenVPN hadn't fully started up, thus the IP wasn't ready for sshd?

Edit2: I modified the ssh init script to require OpenVPN: Required-Start: $remote_fs $syslog $openvpn and got the same error.

TechFanDan avatar Jan 07 '18 14:01 TechFanDan

Same thing here on Ubuntu 16.04 x64. I had to start the SSH daemon manually using the console.

qugu avatar Aug 27 '18 10:08 qugu

Same here.

smeredith avatar May 24 '19 15:05 smeredith