I was hitting the same error message.
But in my case it was not just a matter of Putty configuration, but also Windows 10 OpenSSH server and TightVNC server configurations.
So I share all of them just in case somebody else is having the same problem:
** Remote Windows 10 OpenSSH server configuration (see links below if you wish to change your server port). These are some
directives I changed in the OpenSSH config file (%programdata%\ssh\sshd_config
):
PermitTunnel yes # default: no
AllowTcpForwarding yes # default: no
** Remote Windows 10 TightVNC server configuration:
"Access control" tab menu entry, "Loopback Connections" section:
Tickbox "Allow loopback connections" yes (default: no)
** Local Putty configuration:
Left menu: Session
Host name (or IP address) and port: use IP and OpenSSH server port of your remote Windows 10 (in my case, lets say they are 8.8.8.8 / 22).
Left menu: Connection - SSH - Tunnels. I added these entries:
Source port: 5908 (the local port you will use to enter the tunnel)
Destination: 127.0.0.1:5900 (the port your remote TightVNC server is
listening)
These two ports do not need to be identical. In my case I preferred to use 5908 source port (just to remember it tunnels to my remote server at 8.8.8.8).
With the above configuration, my VNC client can access the server connecting to:
127.0.0.1:5908
I also read these links regarding OpenSSH server configuration in Windows 10:
Installation: https://virtualizationreview.com/articles/2020/05/21/ssh-server-on-windows-10.aspx
Configuration: How to change ssh port on windows 10?
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
Tunneling: http://woshub.com/ssh-tunnel-port-forward-windows/