Sponsored Content
Top Forums UNIX for Dummies Questions & Answers vnc over an ssh tunnel Linux to Linux to Windows Post 302438842 by pludi on Wednesday 21st of July 2010 02:35:30 AM
Old 07-21-2010
AFAIK, the default VNC server port is 5900 for the first display, 5901 for the second... So this should work:
Code:
# Open the tunnel, and close it after 120 seconds if no connection has been made
# SSH automatically forks into the background
$ ssh -f -L 5900:192.168.1.8:5900 'sleep 120'
$ vncviewer localhost

This User Gave Thanks to pludi For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SSH into a linux machine from a windows machine

I basically want to login into different linux machines( on the same network) from a windows machine. I know i can use ssh <machine name>. But i want to automate this process. I dont want to enter the username and password. Is there any way to do it. Can i make some sort of a batch script for it. (4 Replies)
Discussion started by: lassimanji
4 Replies

2. UNIX for Dummies Questions & Answers

Windows to Linux remote console using VNC brings up blank console screen with only mouse pointer

:confused:Hi This was installed on the Linux box a few weeks back by a guy that no longer works for us. All worked fine until last week. Now when we connect its just a blank screen with no icons. I get a whole bunch of errors when starting the service too: Tue Feb 23 14:29:45 2010 ... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

3. UNIX for Dummies Questions & Answers

How to access many X Linux sessions from VNC?

Sorry for my poor english, I'm new in linux world, and i'm in trouble to do remote connections, at the same time, from windows clients (via vnc) to a linux server (debian), I've tried vncserver and x11vnc. My difficult are connecting many windows xp (via vnc), because actually, when I try to... (0 Replies)
Discussion started by: abutre69
0 Replies

4. UNIX for Advanced & Expert Users

VNC over SSH on a reversible tunnel

Hi there, I have a situation in which one of my client have a few computers (MS Windows) behind a non routable box. They also have a tiny server (Debian). Because the box is non routable, I cannot create any port forwarding : neither on port 22 to the Debian server nor on port 590X to... (3 Replies)
Discussion started by: chebarbudo
3 Replies

5. Linux

Help!! trying to connect to linux SSH from windows putty client

Hi, i am trying to connect my Putty session on a windows box to a linux SSH, i have generated private and public key pairs using puttygen, i have set the public one to be in an OPENSSH format... and have put this in my authorized_keys file in linux, when i connect i get the following errors: ... (1 Reply)
Discussion started by: Jtyreman
1 Replies

6. UNIX for Dummies Questions & Answers

SSH tunnel working for ssh but not for sshfs

I'm trying to setup a link between my home pc (work-machine) and a server at work (tar-machine) that is behind a gateway (hop-machine) and not directly accessible. my actions: work-machine$ ssh -L 1234:tar-machine:22 hop-machine work-machine$ ssh -p 1234 user@127.0.0.1 - shh access on... (1 Reply)
Discussion started by: Vathau
1 Replies

7. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

8. UNIX for Advanced & Expert Users

Issues with passwordless sftp2 from windows to Linux using F-Secure SSH Client

Hi, I am facing problems whie trying to do a passwordless ssh to Unix box from windows. Public key was generated using F-secure. When the F-secure client attempts it connects without password but when I try to use sftp2 in command line it prompts for password. I have tried several options and... (0 Replies)
Discussion started by: dhrajj
0 Replies

9. Linux

Issues with passwordless sftp2 from windows to Linux using F-Secure SSH Client

Hi, I am facing problems whie trying to do a passwordless ssh to Unix box from windows. Public key was generated using F-secure. When the F-secure client attempts it connects without password but when I try to use sftp2 in command line it prompts for password. I have tried several options and... (3 Replies)
Discussion started by: dhrajj
3 Replies

10. Windows & DOS: Issues & Discussions

Cant get responsive terminal when I ssh from Windows to Linux using putty.exe

I ssh from Windows to Linux server and execute a few commands. I have ssh keys setup between them and works fine. The commands get executed on the Linux server however I wish to stay on the Linux terminal that was opened by putty.exe. However, the terminal simply does the job and closes. ... (10 Replies)
Discussion started by: mohtashims
10 Replies
vncviewer(1)						     Virtual Network Computing						      vncviewer(1)

NAME
vncviewer - VNC viewer for X SYNOPSIS
vncviewer [options] [host][:display#] vncviewer [options] -listen [port] DESCRIPTION
vncviewer is a viewer (client) for Virtual Network Computing. This manual page documents version 4 for the X window system. If you run the viewer with no arguments it will prompt you for a VNC server to connect to. Alternatively, specify the VNC server as an argument, e.g.: vncviewer snoopy:2 where 'snoopy' is the name of the machine, and '2' is the display number of the VNC server on that machine. Either the machine name or display number can be omitted. So for example ":1" means display number 1 on the same machine, and "snoopy" means "snoopy:0" i.e. display 0 on machine "snoopy". If the VNC server is successfully contacted, you will be prompted for a password to authenticate you. If the password is correct, a window will appear showing the desktop of the VNC server. AUTOMATIC PROTOCOL SELECTION
The viewer tests the speed of the connection to the server and chooses the encoding and pixel format (colour level) appropriately. This makes it much easier to use than previous versions where the user had to specify arcane command line arguments. The viewer normally starts out assuming the link is slow, using a low colour level and using the encoding with the best compression. If it turns out that the link is fast enough it switches to full-colour mode and will use an encoding which compresses less but is faster to gen- erate, thus improving the interactive feel. Automatic selection can be turned off by setting the AutoSelect parameter to false, or from the options dialog. POPUP MENU
The viewer has a popup menu containing entries which perform various actions. It is usually brought up by pressing F8, but this can be configured with the MenuKey parameter. Actions which the popup menu can perform include: * switching in and out of full-screen mode * quitting the viewer * generating key events, e.g. sending ctrl-alt-del * accessing the options dialog and various other dialogs By default, key presses in the popup menu get sent to the VNC server and dismiss the popup. So to get an F8 through to the VNC server sim- ply press it twice. FULL SCREEN MODE
A full-screen mode is supported. This is particularly useful when connecting to a remote screen which is the same size as your local one. If the remote screen is bigger, you can scroll by bumping the mouse against the edge of the screen. Unfortunately this mode doesn't work completely with all window managers, since it breaks the X window management conventions. OPTIONS (PARAMETERS) You can get a list of parameters by giving -h as a command-line option to vncviewer. Parameters can be turned on with -param or off with -param=0. Parameters which take a value can be specified as -param value. Other valid forms are param=value -param=value --param=value. Parameter names are case-insensitive. Many of the parameters can also be set graphically via the options dialog box. This can be accessed from the popup menu or from the "Con- nection details" dialog box. -display Xdisplay Specifies the X display on which the VNC viewer window should appear. -geometry geometry Standard X position and sizing specification. -listen [port] Causes vncviewer to listen on the given port (default 5500) for reverse connections from a VNC server. WinVNC supports reverse con- nections initiated using the 'Add New Client' menu option or the '-connect' command-line option. Xvnc supports reverse connections with a helper program called vncconfig. -XDialog Popup an X dialog when asking for server, username and password. Default is to not popup when vncviewer is start from command line. -passwd password-file If you are on a filesystem which gives you access to the password file used by the server, you can specify it here to avoid typing it in. It will usually be "~/.vnc/passwd". -Shared When you make a connection to a VNC server, all other existing connections are normally closed. This option requests that they be left open, allowing you to share the desktop with someone already using it. -ViewOnly Specifies that no keyboard or mouse events should be sent to the server. Useful if you want to view a desktop without interfering; often needs to be combined with -Shared. -FullScreen Start in full-screen mode. -AutoSelect Use automatic selection of encoding and pixel format (default is on). Normally the viewer tests the speed of the connection to the server and chooses the encoding and pixel format appropriately. Turn it off with -AutoSelect=0. -FullColour, -FullColor Tells the VNC server to send full-colour pixels in the best format for this display. By default a low colour mode is used until AutoSelect decides the link is fast enough. However if the server's native pixel format is colourmapped (as opposed to truecolour) then the server's format is used by default. -LowColourLevel level Selects the reduced colour level to use on slow links. level can range from 0 to 2, 0 meaning 8 colours, 1 meaning 64 colours (the default), 2 meaning 256 colours. -PreferredEncoding encoding This option specifies the preferred encoding to use from one of "ZRLE", "hextile" or "raw". -UseLocalCursor Render the mouse cursor locally if the server supports it (default is on). This can make the interactive performance feel much bet- ter over slow links. -WMDecorationWidth w, -WMDecorationHeight h The total width and height taken up by window manager decorations. This is used to calculate the maximum size of the VNC viewer window. Default is width 6, height 24. -log logname:dest:level Configures the debug log settings. dest can currently be stderr or stdout, and level is between 0 and 100, 100 meaning most verbose output. logname is usually * meaning all, but you can target a specific source file if you know the name of its "LogWriter". Default is *:stderr:30. -MenuKey keysym-name This option specifies the key which brings up the popup menu. The key is specified as an X11 keysym name (these can be obtained by removing the XK_ prefix from the entries in "/usr/include/X11/keysymdef.h"). Default is F8. -via gateway Automatically create encrypted TCP tunnel to the gateway machine before connection, connect to the host through that tunnel (TightVNC-specific). By default, this option invokes SSH local port forwarding, assuming that SSH client binary can be accessed as /usr/bin/ssh. Note that when using the -via option, the host machine name should be specified as known to the gateway machine, e.g. "localhost" denotes the gateway, not the machine where vncviewer was launched. The environment variable VNC_VIA_CMD can override the default tunnel command of /usr/bin/ssh -f -L "$L":"$H":"$R" "$G" sleep 20. The tunnel command is executed with the environment variables L, H, R, and G taken the values of the local port number, the remote host, the port number on the remote host, and the gateway machine respectively. SEE ALSO
Xvnc(1), vncpasswd(1), vncconfig(1), vncserver(1) http://www.realvnc.com AUTHOR
Tristan Richardson, RealVNC Ltd. VNC was originally developed by the RealVNC team while at Olivetti Research Ltd / AT&T Laboratories Cambridge. It is now being maintained by RealVNC Ltd. See http://www.realvnc.com for details. RealVNC Ltd 08 Nov 2006 vncviewer(1)
All times are GMT -4. The time now is 08:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy