ssh user@server -R server:port1:localhost:port2
This way ssh will forward requests to server:port1 to localhost:port2, but anyone can connect to server:port1.
So I'm wondering of there's something that can do this but at the same time supports authentication?
localhost, then you need co authenticate to theserverusingsshand only then you can connect to thelocalhostport, if that would be enough. – Jakuje Jan 12 '17 at 10:19