Request help to manage ssh password



Hi all

I need some help to manage ssh password in a tunnel command line.

I am using ssh to create a tunnel. From a windows box I use putty to
connect to the ssh server. The beginning of the tunnel is defined in
putty client and the end of the tunnel is on the ssh server with the
command line like this one:
ssh -L 50023:lanserver:23 vpnuser@sshgateway -p 443 (this is an
example for telnet).
The tunnel works fine.

Now I want to establish on the server a permanent ssh port forwarding.
I tried ssh-keygen and I could log with no password with
vpnuser@sshgateway, but when issuing the command ssh -L
50023:lanserver:23 vpnuser@sshgateway -p 443 it told me permission
denied. I tried a lot of things but I did not succeded to set up ssh
forwarding without password and without logging with vpnuser. I also
would like to be able to establish the ssh port forwarding in
background with a user that as no shell using a bahs script.

Help would be appreciated.
Thanks in advance.
Mik
.