I have installed tightvnc and openssh on a xubuntu server.

I am trying to debug why I get 'permission denied' error when I try to login from a remote machine.

On server:


>>New 'X' desktop is ServerName:1

>>Starting applications specified in /home/user/.vnc/xstartup

On remote machine:

ssh user@serveripadress  works fine and I can login

On remote machine:

ssh -L 5910: -N -f -l user serveripaddress

fails with 'permission denied' after typing password for tightvnc

On server:

ssh -L 5910: -N -f -l user localhost

at password prompt I used the tightvnc password and got 'permission denied' (I also tried the user password with same response).

Server firewall rules

5901 ALLOW IN remoteipaddress
22   ALLOW IN remoteipaddress

Server VNC listening port:

lsof -i -P | grep -i "listen" | grep Xvnc

Xvnc    2229 user   5u  IPv4  37691      0t0  TCP localhost:5901 (LISTEN)

As I can login via ssh, and the vncserver is running I am not clear why I cant login to the vnc session


I switched to TigerVNC and had same issues above. I managed to get this working by:

On Remote machine:

ufw allow out from any to serveripaddress port 5901

Then I could connect to the server using the TivergVnc viewer client with serveripaddress:1

| improve this answer | |

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.