Hello I have the following problem;
I have a Server that I am configuring to learn a bit of infrastructure and use it to be able to run other services to be able to study other things (web development, data science, graphic models, etc.), and I wanted to be able to connect via ssh on my Server only as a normal connection, and all my services were already available to those who are connecting.
Currently what I do is pass the service port on my Server with a local forwarding (parameter -L in the connection), at the moment I am running only one service, but this way, for each service I have to specify each forwarding in the ssh connection:
"-L <client port> : <ip Server> : <Server port>
". So, when I access the Server, a service that is running on port 1000 on my Server, with the parameter on the connection: "-L 21000:localhost:1000
" I can connect from the client directly with: "localhost:21000
", in case I access a jupyter instance from my Server with the address in the browser equal to: "localhost:21000
".
I would like to be able to do this configuration on the Server, to be able to specify this forwarding "port 21000 on the client listens to port 1000 on the Server" and any other port with a line on the Server for each forwarding, as well as the most basic ssh connection (user and ip and authentication), so that the client has access to all services available on the Server using only "localhost: ".
I do not know if this is really possible (the Server does not know the list of available ports on the client to pass this configuration), if the Server has how to know, how to make the client configure an exception for ports that are conflicting, and other problems ..
If there is no way to do this, I would like to know how I can make multiple services available to any customer in an easy way to configure (I need to write a line for each referral and not have to manually adjust it on my router, which in this case doesn't even let me edit, just delete and create again).
server: local computer I have with ubuntu 18.04 bionic, intel core i3 2100, 6GB DDR3
$ ssh -V
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017