What's wrong with this SSH port forwarding?

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 [email protected] -L 10050:10.11.10.72:10050
[email protected]'s password:
Could not chdir to home directory /home/engelssh: No such file or directory
Connection to 10.11.10.72 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?


Solution 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.