I'm trying to setup ssh over https using apache and proxytunnel on Ubuntu 18.04, but I want the proxy server to be the same as the ssh server.
I have apache going, and from netstat and the output of ssh -vvvv, it looks like I'm successfully connecting to the apache server as after awhile it says HTTP return code: 503 Service Unavailable
and netstat shows an established connection between my laptop and the server. It looks like it is getting hung up trying to connect to itself over ssh.
Line from netstat: tcp 0 1 192.168.2.195:51156 public_ip:22 SYN_SENT 24246/apache2
It gets stuck here until it eventually returns bad request. The server is behind a NAT, so that may be contributing to the issue.
I was wondering if there is an elegant way to have the server connect to localhost instead of having it connect to the router and get reforwarded back to the server
Thanks in advance, let me know if you need more info.