|
|
A better way...
I'm assuming that this works everywhere, it has for me so far...
A better way...
Note that you need to manually edit your /private/etc/sshd_config and your /private/etc/ssh_config files to allow X-Fowarding (remove the # from the start of the line X-Forwarding No, and change the No to Yes).
A better way...
just some more unix lore: instead of explicitly killing and re-starting sshd (or other daemons), sudo kill -HUP <pid> causes the daemon to read its configuration files without terminating.
set up your ~/.ssh/config
Yes, this is probably the ONLY proper way to run X11 apps remotely. I wouldn't even think of opening port 6000, no matter what the access controls are set to!
Of course if you're just on your own private LAN, behind your firewall, you could run direct for maximum speed but the best thing is to set up SSH to forward your X11 sessions by default.
Instead of -X you can also add ForwardX11 yes to your ~/.ssh/config (create it if it doesn't exist), and then you'll have X11 port forwarding as the default. You can verify that your connection is secure by logging into a remote host with SSH and checking the DISPLAY variable: echo $DISPLAY .. it should return "localhost:10" or something similar. This means the X11 stuff is going to the remote host and transported via SSH over to your local display.
You might have to set X11Forwarding yes in the remote host's /etc/sshd_config (or equivalent). I believe this is off by default on Darwin. Be sure to restart the sshd daemon (a reboot will do the trick).
You can set this up for certain hosts only, and you can also set it system-wide for all users. Read the man pages on SSH for more info.
set up your ~/.ssh/config
I just don't see how this works. First of all, even with a firewall in front of the X client, I can set the display variable in a normal ssh session and then run any X app successfully, as the firewall will permit all outbound connections and only ssh inbound. Because you are running the app from inside the firewall, it can reach out and connect to port 6000. But I still wanted to make it work, so I used ssh -X host to connect, but nothing changed. I tried setting the display to 0.0 and leaving it blank - didn't work at all. Tried settiing X11Forwarding in both ssh_config and sshd_config and connections work the same as with a normal ssh session. Doing an echo $DISPLAY always shows the address of the X server, not localhost. And netstat on the server shows a connection to port 6000 from the client. Sigh.
set up your ~/.ssh/config
Try to login with ssh -v -X other.unix.system and watch the extensive debugging information.
set up your ~/.ssh/config
So, it's months later. I came across your question because I was having the same problem. My solution was this: Before you get too far in, first make sure you can type the name of a local X11 application (something like xclock) into a prompt in your Terminal.app window and have it appear locally on your X11 desktop.
Another ssh method
Instead of typing ssh -X unix.machine.name every time, you can use pico, emacs, etc. and edit ~/.ssh/config. Here's the procedure using pico:
In a terminal: pico ~/.ssh/config At the very top of the file, add the following 2 lines: Host unix.machine.name You can also replace "unix.machine.name" with "*" in the Host line to enable it for all hosts you ssh to. This is the way I have mine set up.
2 Steps to enable X11 forwarding
I already have SSH configured securley and use it only with public keys and not passwords.
I mean 3 Steps to enable X11 forwarding
just to add I forgot to mention after change the sshd_config you have to restart SSH |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|