I have a server that I have a domain name for. The DNS redirects the address ssh.example.com
to https://example.com:12345/ssh/
.
Note: My server DNS needs to have a port as my server isn't accessible through the standard ports 80/443, only port: 12345 (This cannot be changed)
The connection is able to be established as I use a reverse proxy (NGINX) on that server. This allows me to redirect to any local service now that I'm in the server. I know this part works as I have another HTTP service running that I can access.
Here is what my NGINX looks like to give an example (this part works):
http {
server {
listen 443 ssl;
server_name example.com;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_certificate /etc/ssl/private/fullchain.pem;
ssl_certificate_key /etc/ssl/private/privkey.pem;
location /ssh/ {
proxy_pass https://192.168.1.1:3128; # This is the part I need help with
}
}
}
From what I've researched I think I want to use a Squid Proxy to redirect to a local HTTP service to then allow me to ssh into my server? This is the part I'm not too sure about.
In the end, if possible, I would like to be able to do ssh user@ssh.example.com
and this allows me to connect to the server. I'm looking for any guidance please.