![](_gb_images/_gb_sitenav_spacer.gif) |
![](_gb_images/_gb_clear.gif) |
Leopard: Remote SSH access
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Fresh-Faced Recruit
Join Date: Jan 2007
Status:
Offline
|
|
Sorry for being a bit of a noob here, but I have a few questions/problems, that I was hoping some of you SuperTechs could help me with. Basically I am trying to connect to a remote Mac (running 10.5.2 with SSH/remote access enabled) using X11/Terminal and be able to open up programs on the computer, which will then be displayed on the connecting computer (a bit like screensharing - so say - open a safari window on the remote computer, which will be displayed on the connecting/local computer).
Here is what I am trying to do ("local >" = connecting computer running X11 or Terminal; "remote >" = logged onto the remote computer):
local > ssh -Y user@remote
remote > cd /Applications
remote > open Safari.app
Now, safari will open on the remote machine, but not on the connecting machine (which is what I am trying to do). If I try to open a xterm window on the remote machine:
remote > xterm
I get a DISPLAY not set/cannot open error. If I do this:
remote > echo $DISPLAY
I basically just get a blank space so it looks like this:
remote > echo $DISPLAY
remote >
And then nothing..... I have tried to enable X11 forwarding in the sshd_config file, but that doesn't help either. I have also tried to login with -X rather than -Y, but that doesn't work either.
Am I doing something really obviously wrong here? I am fairly new to SSH in general - which may be obvious from my post ![Wink](http://forums.macnn.com/images/smilies/oldschool/wink.gif)
|
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status:
Offline
|
|
|
Vandelay Industries
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
If you want to remotely run non-X11 GUI apps, you're going to need VNC. You can tunnel that through SSH too. Performance-wise it's not as good as real remote X11 forwarding, but it is a feasible work-around to get that behavior with non-X11 apps.
|
•
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Fresh-Faced Recruit
Join Date: Jan 2007
Status:
Offline
|
|
=..... you're going to need VNC. You can tunnel that through SSH too.
Thanks for the response guys - I figured that I was being a bit of a noob here. Tunnelling VNC through SSH though sounds interesting. Any directions on that?
Cheers.
|
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
Originally Posted by kga1978
Thanks for the response guys - I figured that I was being a bit of a noob here. Tunnelling VNC through SSH though sounds interesting. Any directions on that?
It's actually quite easy.
• On the Mac you want to run the app, turn on VNC sharing in Sys Prefs > Sharing > Remote Management > Computer Settings > VNC viewer may ...
• On the other Mac open the ssh tunnel:
launch VNC and connect to localhost:59000. Use the password you chose in step 1.
Chicken of the VNC is very popular, but it's no longer being actively developed. JollysFastVNC is not quite as feature-rich (yet - it's still in alpha), but it is being developed and it is fast.
Let us know if you need any more help.
|
•
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Fresh-Faced Recruit
Join Date: Jan 2007
Status:
Offline
|
|
Hi Simon,
Thanks very much, that worked very nicely! However, in order for me to do the SSH tunnelling trick in my lab, I have to go via a 'relay' computer. Basically the SSH traffic would go like this:
SSH from local -> [relay -> remote]
where the computers in [ ] are on a different local network. So basically if I have the following addresses:
local wan ip: 131.111.1.2
relay wan ip: 131.111.10.2
relay lan ip: 10.0.0.2
remote lan ip: 10.0.3
The way I initially tested your method connected directly via SSH from my local machine to the remote machine, and that worked very well. But my sys admin wants me to connect via the relay computer (for obvious reasons I guess) and then SSH from the relay computer to the remote computer, which is on the same local network as the relay.
So what I would normally have to do to establish a SSH connection would be something like this:
local > ssh -X [email protected]
relay > ssh -Y [email protected]
remote > _
Any ideas as to how I could now create a SSH tunnel to transfer the VNC traffic under these circumstances?
Thanks very much for your help,
Kristian
|
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status:
Offline
|
|
I'm sure there's a more elegant solution, but 2 tunnels (one from the local to the relay and one from the relay to the remote) will of course work.
|
•
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_clear.gif) |
|
|
|
![](_gb_images/_img_misc/_gb_mb_previousthread-off.gif)
|
|
![](_gb_images/_gb_clear.gif) |
Forum Rules
|
![](_gb_images/_gb_clear.gif) |
![](_gb_images/_gb_clear.gif) |
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
![](_gb_images/_gb_clear.gif) |
![](_gb_images/_gb_clear.gif) |
![](_gb_images/_gb_clear.gif) |
![](_gb_images/_gb_clear.gif) |
|
![](_gb_images/_gb_sitenav_spacer.gif) |