VNC connection over ssh

Tagged: ,

  • This topic has 3 replies, 1 voice, and was last updated 4 years ago by Re4son. This post has been viewed 7881 times
Viewing 3 reply threads
  • Author
    • #11544

      VNC traffic is not particularly well secured, thus the vnc server restricts connection to come from localhost only.
      To connect to the VNC server, establish an ssh tunnel to the Kali-Pi and then open a VNC connection to the local port on your computer.

      To enable vnc connections from the network add the following line to /etc/vnc.conf:

      $localhost = "no";
      I would configure this option only temporarily for testing purposes and use ssh tunneling as described below in a live environment.

    • #11546


      Establish a vnc connection over ssh from linux to kali-pi with IP address

      ssh -L 5902:localhost:5901 root@
    • #11547


      It’s just as easy from a Windows PC using PuTTY to kali-pi with ip address

      – New Connection:

      – Save as Kali-Pi
      – Goto Connection -> SSH -> Tunnels
      – Tick “Local ports accept connection from other hosts:
      – Source port: 5901
      – Destination: localhost:5901
      – Click “Add”

      – Go back to “Session” And save session “Kali-Pi” again
      – Click “Connect”
      – Enter ssh credintials

      – Accept Firewall Rule pop up message

      – Open TigerVNC Viewer and connect to

      – Enter password


    • #11567


      I recommend to use ConnectBot for the ssh tunnel and AndroidVNC as VNC client.

      In ConnectBot:
      – Connect to the Kali-Pi
      – Click the “Back” arrow and long press the connection for context menu
      – Select “Edit port forwards”
      – Add new port forward:
      + Nickname: VNC
      + Type: Local
      + Source Port: 5901
      + Destination:

      In androidVNC:
      – Create new connection:
      + Nickname: Kali-Pi
      + Password:
      + Address:
      + Port: 5901
      + Color Format: 256 colors (1bpp)
      – Connect
      + Scaling mode: Zoomable
      Input mode: “Touch and Mouse Pan and Zoom” to enlarge the desktop
      Input mode: “Mouse Pointer Control Mode” to control the remote mouse

Viewing 3 reply threads
  • The forum ‘Kali-Pi – Menus and Features’ is closed to new topics and replies.