Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

x11Forwarding problems sunfreeware OpenSSH5.0p1 1

Status
Not open for further replies.

maximusGeek

Technical User
Aug 6, 2002
105
US
I upgraded to OpenSSH5.0p1 (Sunfreeware pkg) and now my X11Forwarding will not work. My config files look fine.

Anyone else have this problem?
 
Are you sure your editing the correct sshd_config file?

X11Forwarding yes

Have you HUP'ed the "parent" sshd process?

What do the logs say?
 
Yes, I have both the correct /usr/local/etc/sshd_config and ssh_config files

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

# Host *
ForwardAgent yes
ForwardX11 yes

The process has been HUPed and I have even go as far as rebooting. I am starting it up with inetd and not as a demon.

When I run in debug I see no failures but I also see nothing about the user env being set or X11Forwarding being turned on.
 
I recently upgraded to version 5.1p1 and I am still having the same problem. It is if the DISPLAY variable is not being set.

Has anyone else had this problem?
 
Funny, I ran into the same problem on using the supplied /usr/lib/ssh/sshd on Solaris 10 yesterday. When I run it in debug mode I get the following output:

Code:
debug1: sshd version Sun_SSH_1.1
...
debug1: Client protocol version 2.0; client software version OpenSSH_4.1
debug1: match: OpenSSH_4.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1
..
debug1: session_input_channel_req: session 0 req x11-req
debug1: bind port 6010: Cannot assign requested address; skipping this port
...
debug1: bind port 6998: Cannot assign requested address; skipping this port
debug1: bind port 6999: Cannot assign requested address; skipping this port
Failed to allocate internet-domain X11 display socket.
debug1: x11_create_display_inet failed.

It tries to bind to ports 6010 - 6999 and fails. Does OpenSSH complain in a similar fashion when you run it in debug mode?

Annihilannic.
 
Annihilannic,

Yes... my DEBUG results are similar to yours. I'm running Solaris 9

debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
debug1: server_input_channel_req: channel 0 request x11-req reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req x11-req
Failed to allocate internet-domain X11 display socket.
debug1: x11_create_display_inet failed.
debug1: server_input_channel_req: channel 0 request pty-req reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.
debug1: session_new: session 0
debug1: session_pty_req: session 0 alloc /dev/pts/4
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
 
Thanks for that EGP, my symptoms certainly match those in the Sun Bug ID 6704823 mentioned in that thread. However unfortunately the workaround described (configuring inet6 on lo0 and starting sshd with -4) don't appear to help me.

Annihilannic.
 
Annihilannic,

The work around worked for me. I think you want to do only one of the work arrounds, not both.

I used sshd -4 and started ssh on 0.0.0.0 (default for me)

when run debug mode, do you see sshd accepting the -4 parameter?

elgrandeperro - Thanks!
 
I think I tried them separately, I'll try again tomorrow when I'm near my Solaris 10 box again. If I recall correctly -4 is not a valid option at all for the bundled sshd. Likewise, I think 0.0.0.0 is default for me, and overriding it with -o ListenAddress=0.0.0.0 on the command-line made no difference.

Annihilannic.
 
I've got it working too now.

I was testing using:

Code:
/usr/lib/ssh/sshd -4 -o ListenAddress=0.0.0.0 -p 443 -ddd

However it was returning "bad addr or host: :: (no address for the specified node name". This was because there was also a "ListenAddress ::" entry in /etc/ssh/sshd_config for IPv6. I presumed specifying the ListenAddress on the command-line would override this, but they appear to be additive options... which makes sense I guess since you need to specify it in two separate formats for IPv4 and IPv6.

So creating a new sshd_config without that ListenAddress and specifying -4 on the command-line seems to do the trick! Unfortunately there doesn't appear to be an sshd_config option equivalent to -4.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top