[olug] VNC/SSH tunnel

David Walker olug at grax.com
Fri Oct 17 01:38:52 UTC 2008


~/.ssh/config (settings for your profile only) and/or 
/etc/ssh/ssh_config (settings for entire machine) are settings for the 
ssh *client*, not the *server*.  (/etc/ssh/sshd_config is for the server)

Once you change the setting in one of those files, the ssh command that 
vnc (with via) uses will use the alternate port.  Use the lines below to 
specify that you want to use port 2299 for all outgoing ssh connections 
except for connections to the specified IP, in which case you want to 
use port 2211.

Host *
        Port 2299

Host 192.168.1.106
        Port 2211
>
>
> Eric P wrote:
>> On Wed, Oct 15, 2008 at 5:27 AM, David Walker <olug at grax.com> wrote:
>>   
>>> You can set the alternate port number in your ~/.ssh/config file or in
>>> /etc/ssh/ssh_config file and vnc will use it.
>>>
>>> The logic of locking Vino to localhost and then using the
>>>  vncviewer -via "friend at 192.168.1.106" localhost:0
>>> command seems correct.  I use kde so I can't test to see if it works for
>>> me though.
>>>
>>>
>>>     
>>
>> Changing the port for tSSH server is done on the server side.  The VNC
>> *client* is on another computer and won't know which port SSH is
>> running on the *server*.  I need to explicitly tell VNC which port to
>> use for the SSH tunnel.
>>
>> I can just pass in the port in the alternative method for creating the
>> SSH tunnel.
>> So in one terminal:
>> ssh -p 2211 -C -L 6000:localhost:5900 friend at 192.168.1.106
>>
>> And then in another:
>> vncviewer localhost:6000
>>
>> But I'd still rather use vncviewer with the -via command so that I
>> don't leave open SSH connections laying around.
>>
>> Eric
>> _______________________________________________
>> OLUG mailing list
>> OLUG at olug.org
>> https://lists.olug.org/mailman/listinfo/olug
>>
>>   
>




More information about the OLUG mailing list