Re: embarrassing X question
On Thu, Jul 19, 2001 at 01:25:58PM -0400, Mike wrote:
| D-Man wrote:
| >
| > I would use ssh instead of rlogin if you can. Also, enable the
| > ForwardX11 option in ssh. If you do this then the display will be
| > setup for you and it will be encrypted as well. This is also the
| > easiest (only?) way to display stuff back on a masq'd box.
|
| How do you do this? I've been trying to do this for some time now with no
| success. Every time I get:
|
| mike@hobbiton:~$ ssh -f hal9000 xterm
| mike@hal9000's password:
| mike@hobbiton:~$ xterm Xt error: Can't open display: hal9000:10.0
|
| hobbiton is the local machine here, and hal9000 is the remote system I'm
| trying to connect to while wanting the xterm (in this case, anyway) to
| display here on hobbiton. I've got the ForwardX11 option set to true on
| both machines, both in the sshd_config and the ssh_config Is there anything
| else I need to do?
Other than enabling ForwardX11 in both the server and client (sshd and
ssh) I don't think you need to do anything. What happens if you login
and get a shell, then run xterm? The error message shows that DISPLAY
was set properly (sshd creates a display on the server, 10.0, which it
reads from, encrypts, and sends to the client who passes it on the
local DISPLAY) but that display couldn't be opened. I'm wondering if
maybe ssh is closing the connection too soon.
On the Solaris box at school /etc/sshd_config has
X11Forwarding yes
X11DisplayOffset 10
On my Debian box in ~/.ssh/ssh_config I have in the section for the
remote machine
ForwardX11 yes
On the client side you can use the -X option instead of the config
file. I like the config file because my options become "persistant".
HTH,
-D
Reply to: