Page 3 of 3

Re: Trouble working with SSH

Posted: 3. Jul 2011, 21:40
by Dennola4
I am starting feel like an idiot here.

1) open terminal on client and run:

Code: Select all

Original-Art-iMac:~ gallerydir$ ssh -p 6666 -C -L 5901:localhost:5901 dennis@111.222.333.444 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'
Now I try either:
2a) open second terminal on client and run:

Code: Select all

Original-Art-iMac:~ gallerydir$ vncviewer -compresslevel 9 local host
which yields:

Code: Select all

-bash: vncviewer: command not found
Or:
2b) open second terminal on client and run:

Code: Select all

ssh -p 6666 dennis@111.222.333.444
then run:

Code: Select all

dennis@darkstar:~$ vncviewer -compresslevel 9 localhost
which yields:

Code: Select all

Error: Can't open display:
:oops: :oops: :oops: :oops: :oops: :oops:

Re: Trouble working with SSH

Posted: 3. Jul 2011, 21:45
by gapan
You don't have vncviewer installed in your mac. You need to use some kind of vnc client application and point it to localhost (note, there is no space in there). I'm sorry, but I have no idea what vnc applications are out there for macs. vncviewer itself might be available somehow. MacOS might also include a vnc viewer (probably named something like "Connect to remote desktop").

2b certainly will never work. You need to run the vnc viewer applications in your client machine, not the server.

Re: Trouble working with SSH

Posted: 3. Jul 2011, 21:58
by Dennola4
Ok, got it.

First I opened a console on the client (iMac) and ran the command to establish an SSH tunnel:

Code: Select all

$ ssh -p 6666 -C -t -L 5900:localhost:5900 dennis@111.222.333.444 'sudo x11vnc -rfbauth ~/.vnc/passwd -auth /var/state/gdm/:0.Xauth -display :0'
Then I downloaded the VncViewer cross-platform java viewer from http://www.tightvnc.com/download/1.3.10 ... avabin.zip and unzipped it. I opened a second console and navigated to the TightVnc directory called (or containing) "classes".

From this directory, using specified arguments from the README, I ran the command:

Code: Select all

$ java VncViewer HOST localhost
This launched a VNC authentication box with a password field and an options button allowing the user to change variables such as compression level using a very minimal GUI. I entered the password which is stored on the server under ~/.vnc/passwd and that was it...

Goal accomplished: Remote desktop control using VNC through SSH tunnel from work iMac to home Linux box.

Thank you, thank you, thank you SalixOS community. 8-) :D 8-)

Re: [SOLVED] Remote Linux desktop through SSH tunnel from Ma

Posted: 14. Dec 2011, 09:52
by Dennola4
Bumping an old post here....

....but I just want to say for the record that the very patient and exact explanations of Shador, Thenktor, Gapan, in this old thread just helped me get remote desktop going from my Android LG Optimus S (client) to my Salix laptop (server) using vnc through an ssh tunnel.....and using public/private key pair rather than password. Yesssssssss.

There's no WAY I would've known how to do this without the lessons learned in this exchange. An OS is only as good as it's devs. These guys are great.

Happy Holidays to all.

8-) 8-) 8-) 8-) 8-) 8-) 8-) 8-)