We could connect to a host that runs a VNC server that have SSH (VNC over SSH) by:

$ vncviewer -via "<USERNAME>@<HOST> -p <PORT>" localhost

It automatically sets an SSH connection via

ssh
program.