ansible-openvpn-hardened
ansible-openvpn-hardened copied to clipboard
Cannot connect to SSH once on VPN
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?
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.
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.
Same thing here on Ubuntu 16.04 x64. I had to start the SSH daemon manually using the console.
Same here.