ssh firstname.lastname@example.org -g -L 4321:localhost:28017
to establish a tunnel from my MacBook to my dedicated server at my hosting provider. It works well. Now I want to access several admin sites on the remote server (a MongoDB status page, a RabbitMQ page etc, all on different ports). All of them are bound to 127.0.0.1 on the remote machine. How can I tweak this ssh command to
- assign a name to the tunnel and use e.g. "my.tunnel.name" in my browser
- to be able to define the remote port in my browser; I would like to connect to my.tunnel.name:port, in order to be able to call the different sites
Is this possible with ssh? I've read the man pages and googled around for two days now, but it does not seem to work.
--edit 2012-06-01 23:36-- Thanks to the provided answers and comments the port forwarding works now using
ssh email@example.com -D 4321
I can set this up as a proxy in my browser and the browser will treat any request to localhost:anyport as if it was made on the remote server. Using a name is now not necessary, since the browser is for remote server sites only.