title: ssh tunnel VNC server connection closed unexpectedly
body: <p>I have to tunnel the VNC server(tightvnc-server) running on my local machine to a remote server, so at remote server  can access my local machine without port forwarding on router(at local machine network).</p>
  <p>Right now I am using the following command</p>
  <pre><code>      ssh -R 5950:localhost:5900 user@remote.ddns.net
  </code></pre>
  <p>Where  <code>5900 </code> the vnc server port on my local machine. And I have to access the machine from remote server using the command localhost:5950. And when I try to connect using vnc viewer I am getting the error <code>connection closed unexpectedly</code>. Normally if no connection exist I was getting connection refused error. But here something is missing in tunneling. Can any please tell me what could be the reason.</p>