5

I am forwarding a port of a remote server to my local mac as follows:

ssh -L 15672:localhost:15672 me@example.com

When I do this in a shell, I am also logged into example.com. Yet I would like the command to return and not occupy my shell.

Is there an option to do this?

8

You should add -N to avoid getting a shell on the remote, and -f to move the process to the background without losing it if you close the shell.

  • great. That was quick. I will accept when stackexchange let's me. – user152468 Apr 30 '15 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.