Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th June 2006, 05:27 PM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
Can't get X forwarding working with SSH

I've taken this issue to LQ with no luck. After searching, I also noticed an old thread here with the same issue, but no resolution.

My issue is that I have sshd in FC5 configured to allow X forwarding, but it doesn't work. I've tried everything I know of to get the config to do what I want it to do, but it just doesn't work. In case I'm missing something, I've even taken the config file from a computer that has sshd working properly and replaced it with the config I have in FC5.

Any ideas?

Here's the thread on LQ: http://www.linuxquestions.org/questi...d.php?t=451016
Reply With Quote
  #2  
Old 9th June 2006, 05:55 PM
Nord Offline
Registered User
 
Join Date: Feb 2005
Location: London, Ontario, Canada
Age: 33
Posts: 103
try
ssh -X username@host
or
ssh -Y username@host
Reply With Quote
  #3  
Old 9th June 2006, 05:59 PM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
Yeah, I figured someone would say that. I've tried both those. I'm not new to this stuff, I've been using SSH for a long time on a lot of different computers. It is only with Fedora 5 I have had this issue.

Thanks for the help.
Reply With Quote
  #4  
Old 9th June 2006, 06:17 PM
William Haller Online
Registered User
 
Join Date: Jul 2005
Age: 52
Posts: 1,013
Server side - sshd config options
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

Client side ssh config options
ForwardX11 yes
ForwardX11Trusted yes

This is taken from a working FC5 pair where X forwarding works. Try service sshd restart on the server side to make sure it is running the options you think it is. You don't need any command line options. This particular combination is going across a NAT translation as well. It really should just work.
Reply With Quote
  #5  
Old 9th June 2006, 10:18 PM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
Quote:
Originally Posted by William Haller
Server side - sshd config options
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

Client side ssh config options
ForwardX11 yes
ForwardX11Trusted yes

This is taken from a working FC5 pair where X forwarding works. Try service sshd restart on the server side to make sure it is running the options you think it is. You don't need any command line options. This particular combination is going across a NAT translation as well. It really should just work.
That's exactly what I have in my config file. I've restarted sshd since I changed stuff a long time ago.

I'm almost absolutely sure that this isn't an issue in the sshd_config file. The thing is though, I don't know what the issue is. The only thing I could come up with is that is an xauth issue, or a bug.

Any other ideas?
Reply With Quote
  #6  
Old 9th June 2006, 10:59 PM
buddha Offline
Registered User
 
Join Date: Apr 2005
Location: Texas
Posts: 354
Have you tried running ssh in verbose mode to see if it shows what's going wrong?

ssh -vvv user@host
Reply With Quote
  #7  
Old 10th June 2006, 04:19 AM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
I just tried that. I spent some time looking at the output, but I couldn't understand most of it.
I only did a level 2 debug because it was too long to post here. Here it is:
Code:
pdeman2@linux:~> ssh -Xvv <censor>@<censor> -p <censor>
OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to <censor> [<censor>] port <censor>.
debug1: Connection established.
debug1: identity file /home/pdeman2/.ssh/identity type -1
debug1: identity file /home/pdeman2/.ssh/id_rsa type -1
debug1: identity file /home/pdeman2/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 134/256
debug2: bits set: 496/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'softzilla.net' is known and matches the RSA host key.
debug1: Found key in /home/pdeman2/.ssh/known_hosts:4
debug2: bits set: 484/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/pdeman2/.ssh/identity ((nil))
debug2: key: /home/pdeman2/.ssh/id_rsa ((nil))
debug2: key: /home/pdeman2/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/pdeman2/.ssh/identity
debug1: Trying private key: /home/pdeman2/.ssh/id_rsa
debug1: Trying private key: /home/pdeman2/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: x11_get_proto: /usr/X11R6/bin/xauth  list :0.0 . 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 0
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug2: channel 0: request shell confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Reply With Quote
  #8  
Old 10th June 2006, 05:32 AM
a thing's Avatar
a thing Offline
Registered User
 
Join Date: May 2005
Posts: 288
What are you expecting it to do? Show you the desktop? Run the command that starts the desktop, for example startkde or gnome-session.

Last edited by a thing; 10th June 2006 at 05:44 AM.
Reply With Quote
  #9  
Old 10th June 2006, 05:52 PM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
No. It's just that every time I try to start an X application, it comes up with an error as shown in the link in the first post.
Reply With Quote
  #10  
Old 10th June 2006, 07:03 PM
William Haller Online
Registered User
 
Join Date: Jul 2005
Age: 52
Posts: 1,013
The only difference that I see is that in your debug listing the auth that is being requested is

debug2: x11_get_proto: /usr/X11R6/bin/xauth list :0.0 . 2>/dev/null

versus

debug2: x11_get_proto: /usr/bin/xauth list :0 2>/dev/null

For a quick test, add a symbolic link to the old xauth location from FC4 on the FC5 box and see if things start working.
Reply With Quote
  #11  
Old 10th June 2006, 08:50 PM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
I don't have FC4.
Reply With Quote
  #12  
Old 10th June 2006, 09:03 PM
William Haller Online
Registered User
 
Join Date: Jul 2005
Age: 52
Posts: 1,013
My point was that for some reason the X11 authentication is trying to load the xauth from the path where it existed in FC4 whether you have FC4 or not. All of the X11 got moved from /usr/X11R6/bin to the standard directories like /usr/bin in FC5. Your sshd session is trying to load the old location. A symbolic link might get things working more quickly than tracking down where the xauth is starting up from.
Reply With Quote
  #13  
Old 11th June 2006, 12:17 AM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
Alright, I just tried it, it didn't work. I'm still getting the exact same results.
Reply With Quote
  #14  
Old 11th June 2006, 01:19 PM
jcliburn's Avatar
jcliburn Offline
Registered User
 
Join Date: Nov 2004
Location: Mississippi, USA
Posts: 1,180
You're running an old version of sshd (4.2p1) on the server. The current version is 4.3p2, which looks for xauth in the correct place. What distro are you running on the server?
Reply With Quote
  #15  
Old 11th June 2006, 09:41 PM
pdeman2 Offline
Registered User
 
Join Date: May 2006
Location: Maine, USA
Posts: 37
I have FC5, I just did a yum update for the first time in a while, it now has the latest sshd, but X forwarding is still not working.
Reply With Quote
Reply

Tags
forwarding, ssh, working

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Port forwarding not working SpectrumDT Servers & Networking 6 24th April 2009 04:52 PM
Packet Forwarding from eth0 to eth1 isn't working rajat123 Servers & Networking 0 7th May 2007 09:58 AM
email forwarding not working...firewall??? PinkZeppelin Servers & Networking 1 10th May 2006 11:51 AM
email forwarding not working PinkZeppelin Servers & Networking 0 10th May 2006 10:11 AM
X forwarding not working on FC3 bakwas_internet EOL (End Of Life) Versions 1 29th March 2005 11:06 AM


Current GMT-time: 22:58 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat