I am trying to setup port forwarding to access port 10050 via SSH on a remote server. I want to connecto to port 10050 on localhost and that should forward my request via SSH to port 10050 on the server. So I tried the following:

$ ssh engelssh@ -L 10050:
engelssh@'s password:
Could not chdir to home directory /home/engelssh: No such file or directory
Connection to closed.

But where does this error come from? Why does it try to change to the engelssh user's home directory, even though I don't need a login shell but just this port forwarding? Or is it a configuration issue on the server?

1 Answer 1


Try the -N option. From the man page:

     -N      Do not execute a remote command.  This is useful for just for‐
             warding ports.

And of course your user probably should have a home directory, so you should also fix that.

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.