A couple of updates/corrections:

- The SSH implementation in MSYS2 does in fact work with the TurboVNC
viewers (my bad.  I forgot I had tested that.)

- I fixed the ExtSSH implementation in the Java TurboVNC Viewer, so it
now properly redirects input and output from the SSH subprocess.  Thus,
'-via -extssh' in the Windows/Java TurboVNC Viewer should now work
identically to '-via' in the native Windows TurboVNC Viewer.  That fix
is available in the latest 2.2.x stable pre-release build
(https://turbovnc.org/DeveloperInfo/PreReleases) once Travis finishes
spinning it.

Let me know if you have any further problems or need additional help.

On 3/18/20 4:10 PM, DRC wrote:
> Several comments/questions:
>
> - Generally speaking, you should not execute VncViewer.jar directly. You
> should use the vncviewer-java.bat (console) or vncviewer-javaw.bat (no
> console) batch scripts, which will properly load the TurboVNC Helper.
> That isn't the cause of this issue, but running the TurboVNC Viewer
> without the TurboVNC Helper will result in a loss of functionality.  To
> pass Java system properties to the Java TurboVNC Viewer, set them in the
> JAVA_TOOL_OPTIONS environment variable (e.g. 'set
> JAVA_TOOL_OPTIONS=-Dturbovnc.foo=bar'.)
>
> - Are you sure that 5900 is the correct SSH port?  5900 is generally a
> port on which a VNC server listens, not a port on which an SSH server
> listens.  That could be the source of the error.  The default value of
> SSHPort is 22, which is correct for most SSH servers.
>
> - When setting VNC_VIA_CMD in a .bat file, you have to escape the %
> symbols, so your .bat file should look something like this:
>
>   @echo off
>   setlocal
>   set VNC_VIA_CMD=ssh.exe -o StrictHostKeyChecking=no -o
> UserKnownHostsFile=/dev/null -f -L %%L:%%H:%%R %%G sleep 20
>   "c:\program files\turbovnc\cvncviewer.exe" -via {server}.{domain}
> {other_TurboVNC_Viewer_args} localhost:{display_number}
>
>   That could be the source of the error.
>
> - Neither viewer (Java nor native) accepts an argument of -vncpasswd.
> That could be the source of the error.  The Java TurboVNC Viewer accepts
> -passwd, which seems to be what you're aiming for.  The native Windows
> TurboVNC Viewer does not have a mechanism for reading a VNC password
> file directly.
>
> - I presume that ssh.exe is a Cygwin-derived implementation of OpenSSH,
> but if it isn't, then please note that only Cygwin-derived
> implementations of OpenSSH can be used on Windows with the native
> Windows TurboVNC Viewer or the Java TurboVNC Viewer with -extssh.
> Native Windows implementations of OpenSSH, including the Microsoft
> implementation in Windows 10 and the MSYS implementation, do not
> properly support the SSH fork option (-f).
>
> - In general, -extssh is not very well supported in the Windows/Java
> TurboVNC Viewer.  It won't work at all if any interactive input (such as
> an SSH password or SSH public key passphrase) is required.  Thus, I
> would recommend using the native Windows TurboVNC Viewer (cvncviewer),
> which would mean that you need to find another way to read the VNC
> password file and pass it to that viewer.
>
> - If you are connecting to the TurboVNC Server or another Un*x Xvnc
> server, then you need to specify the display number.  Otherwise, the
> TurboVNC Viewer will connect to display :0 by default, which is probably
> not what you want.  That could be the source of the error.
>
> If none of those is the source of the error, then please tell me what
> the error actually is.  "No success" doesn't tell me anything useful.
>
> DRC
>
> On 3/17/20 7:54 AM, [email protected] wrote:
>> Hi Folks,
>>
>> I have been using TurboVNC through an SSH tunnel on Windows. However,
>> when my clients connect they receive a confirmation window because the
>> host key is unknown. Since my environment is controlled, I would like to
>> skip this warning message and just connect (something similar to ssh -o
>> StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null user@host). 
>>
>> I have tried to use both cvncviewer.exe and VncViewer.jar for this, but
>> with no success.
>>
>> In both cases, I created a .bat file with the following content:
>>
>> /@echo off/
>> /SET VNC_VIA_CMD=ssh.exe  -o StrictHostKeyChecking=no -o
>> UserKnownHostsFile=/dev/null -f -L %L:%H:%R %G sleep 20/
>> /java -jar VncViewer.jar -via server.domain -sshport 5900 -vncpasswd
>> vncfile -ExtSSH localhost/
>>
>> I have also tried this other way, but with no luck...
>>
>> /@echo off/
>> /java //-Dturbovnc.via="ssh.exe  -o StrictHostKeyChecking=no -o
>> UserKnownHostsFile=/dev/null -f -L %L:%H:%R %G sleep 20" //-jar
>> VncViewer.jar -via server.domain -sshport 5900 -vncpasswd vncfile
>> -ExtSSH localhost/
>>
>> What am I doing wrong?
>>
>> Cheers,
>>
>> Rafael

-- 
You received this message because you are subscribed to the Google Groups 
"TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/turbovnc-users/968fd16c-0c42-f972-b0d4-10c889600772%40virtualgl.org.

Reply via email to