LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-13-2008, 08:54 AM   #1
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Rep: Reputation: 15
x forwarding is not happening with ssh


I am using one host computer and an embedded board(ARM processor linux)..
Both are in the same network..

ssh is happening properly between two systems..

But I can't open display(e.g.,aterm) between either systems when I did ssh ..
X forwarding is happening between other systems in the network..
But cant do x forwarding w.r.t.embedded board..

Here are some outputs I got..

Code:
(From host to board)

[vasudha@localhost ~]$ ssh -X -vvv root@192.168.1.57
OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.57 [192.168.1.57] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /home/vasudha/.ssh/id_rsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
    .
    .
   
debug2: callback start
debug2: x11_get_proto: /usr/bin/xauth  list unix:10.0 2>/dev/null
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
    .
    .
    .
    .
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
debug1: Remote: No xauth program; cannot forward with spoofing.
debug2: channel 0: rcvd adjust 131072
Last login: Thu Jan  1 03:00:38 1970 from 192.168.1.60
[root@INN /root]$aterm 
aterm: can't load font "7x14"
config_geom = 501x316
root_geom = 501x316+4+30, root_size = 640x480

(Here it hangs for ever..)

(From board to host..)
[root@INN board]$ssh -X -vvv vasudha@192.168.1.60
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7b 10 Apr 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug3: RNG is ready, skipping seeding
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.60 [192.168.1.60] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
     .
     .
     .
debug3: tty_make_modes: 92 0
debug3: tty_make_modes: 93 0
debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req
debug2: channel 0: request shell
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Last login: Thu Mar 13 15:41:20 2008 from 192.168.1.57
[vasudha@localhost ~]$ xterm
_X11TransSocketINETConnect() can't get address for localhost:6010: Temporary failure in name resolution
xterm Xt error: Can't open display: localhost:10.0
[vasudha@localhost ~]$ 
(it willnot hang here..no display also..)

*In /etc/ssh/sshd_config of both the systems, I did,..

X11Forwarding yes

Can anyone tel me why I am getting these types of warnings..?

Can you tell me the steps to resolve this ??

Thanks in advance..

Last edited by vasudharao; 03-13-2008 at 11:52 PM.
 
Old 03-13-2008, 10:03 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
try ssh -Y instead of -X
 
Old 03-13-2008, 01:06 PM   #3
hashbangbinbash
Member
 
Registered: Mar 2008
Posts: 106

Rep: Reputation: 16
I have a problem x-forwarding as well, I'm using Gentoo on a remote dedicated server.

first
Quote:
ssh -X -vvv root@my.box.net
and then

Quote:
hashbangbinbash ~ # ddd
Error: Can't open display:
ddd is just a debugging tool, and there were no errors on the -vvv output. I've tried using ssh with -X as well as -Y but with the same error message. Any suggestions?

Last edited by hashbangbinbash; 03-13-2008 at 01:11 PM.
 
Old 03-13-2008, 01:50 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Does /etc/ssh/sshd_config have the line
Code:
X11Forwarding yes
 
Old 03-13-2008, 11:13 PM   #5
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Original Poster
Rep: Reputation: 15
Yes..since both of my systems are not supporting x forwarding,I did
X11Forwarding yes in /etc/ssh/sshd_config in both the systems..

When I did ssh with -Y also I am getting same debug message..
"debug1: Remote: No xauth program; cannot forward with spoofing."
What is this mean..??

Can anyone tel me what is xauth program?
I think it is needed in my case..

Thank you..

Last edited by vasudharao; 03-14-2008 at 01:23 AM.
 
Old 03-14-2008, 01:27 AM   #6
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Original Poster
Rep: Reputation: 15
I searched in google..its mentioned one place that if you get warning
"No xauth data; using fake authentication data for X11 forwarding"then you should add "XAuthLocation /usr/bin/xauth" to /etc/ssh/ssh_config..I did the same but facing same problem..

Anyone know about this issue..??

Thank you..

Last edited by vasudharao; 03-14-2008 at 01:28 AM.
 
Old 03-14-2008, 01:59 AM   #7
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Original Poster
Rep: Reputation: 15
Can you tel me what is ~/.Xauthority file..
It is present in my host system but it is not present in my embedded board..Is this creating problem..??

If needed,How to create ~/.Xauthority file..??

Last edited by vasudharao; 03-14-2008 at 05:02 AM.
 
Old 03-14-2008, 08:37 AM   #8
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Original Poster
Rep: Reputation: 15
I removed the warning "debug1: Remote: No xauth program; cannot forward with spoofing."(while doing ssh from host to board)
What I did is,

I added "/usr/X11R6/lib" to /etc/ld.so.conf

I added "XAuthLocation /usr/X11R6/bin/xauth" to /etc/ssh/sshd_config
and restarted sshd..

But still xforwarding is not happening..

when I use aterm in board after doing ssh,I get..

aterm: can't load font "7x14"
config_geom = 501x316
root_geom = 501x316+4+30, root_size = 640x480
(and hangs forever_

If I run other gtk application also it hangs forever without any warnings..

Can you help me in this..??



Thank you..
 
Old 03-14-2008, 10:07 AM   #9
hashbangbinbash
Member
 
Registered: Mar 2008
Posts: 106

Rep: Reputation: 16
Quote:
Originally Posted by reddazz View Post
Does /etc/ssh/sshd_config have the line
Code:
X11Forwarding yes
Yes, yes it does.
 
Old 03-14-2008, 10:24 AM   #10
Sm1ler
Member
 
Registered: Apr 2004
Location: UK
Distribution: Fedora Core (all), Knoppix, RHEL, Centos, Debian
Posts: 100

Rep: Reputation: 16
Are you sure you made the changes to the /etc/ssh/sshd_config and not the ssh_config that has caught me out a number of times - Also as a simple test try ssh -o ForwardX11=yes user@host I use this method for a few things but should work fine for xterm gnome-terminal etc etc infact I have no problems with it for everything! Hope this helps.. Also on another note this even works on most systems with the sshd_conf set to (x11forwarding no) I guess because I am not forwarding the whole xserver.
 
Old 03-14-2008, 12:56 PM   #11
hashbangbinbash
Member
 
Registered: Mar 2008
Posts: 106

Rep: Reputation: 16
For myself, it still comes back with: can't open display.
 
Old 03-18-2008, 01:26 AM   #12
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Original Poster
Rep: Reputation: 15
Hey..X forwarding is happening in one direction.. i.e.,I can see gedit window of my system on my board's screen..what I did is..I have added
"nameserver xxx.xxx.xxx.xxx" to /etc/resolve.conf file..

But from host to board x forwarding is not happening..i.e., when I did aterm (after ssh with -X from host to board)in board,window displayed on the board,but in host no display..

/etc/resolve.conf files are similar in both the systems..

what may be other issue..??

Last edited by vasudharao; 03-18-2008 at 01:36 AM.
 
Old 03-18-2008, 02:32 AM   #13
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
xauth

vasudharao, I didn't get it. What are you calling the board?

how to use xauth :
xauth gives you the authorithy to open a window on the X server is authentification is activated on the X server. Normally, authorithy keys are handled automatically by ssh when you do -X. -Y is for when authorithy is not activated on the X server (the X server is the ssh client).
Th handle xauth manually, you can do a "xauth -extract filename $DISPLAY" to extract the authorization you have with your user to open a window to a file named filename. Then, you have to scp this file to where you connect to with ssh. You can then merge this authorisation with the sshed user's ~/.Xauthority file with that command : xauth merge filename.
If you handle the authority yourself, you don't need the -X anymore. You can simply forward the X port like this :
ssh -R 60xx:localhost:60xx foreignhost
then, do export DISPLAY=localhost:xx, so you use the right display.
(of course, replace xx with the DISPLAY number you want to use).
 
Old 03-19-2008, 12:02 AM   #14
vasudharao
LQ Newbie
 
Registered: Feb 2008
Posts: 26

Original Poster
Rep: Reputation: 15
* I am developing applications for ARM processor..(as mentioned in the earlier post)..my ARM processor is having linux as its OS..I am calling this as my board(embedded board)..

* Right now I am able to do..
> when I do ssh -X from board to host,and then when I run gedit, I can see the window on my board's screen..
> but reverse is not possible..i.e.,when I do ssh -X from host to board, windows of board's applications I cannt see on host's screen..application hangs for ever without warning....

I think I answered your questions..


I did "ssh -o ForwardX11=yes user@host" also but still no change..


Can you help me..?

Thank you..

Last edited by vasudharao; 03-19-2008 at 12:05 AM.
 
Old 03-19-2008, 12:21 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
When connecting from the board to your computer, do you have the X server running on the board? Was X properly installed?
You seem to be having problems like not being able to find xauth, libraries & resources.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH X forwarding krusty_lab AIX 10 01-02-2008 10:36 AM
SSH and X forwarding? SlowCoder Linux - Newbie 8 05-28-2006 11:24 PM
SSH X forwarding djgerbavore Linux - Networking 1 11-17-2005 10:40 AM
X forwarding via SSH bd1308 Linux - Software 4 08-30-2005 08:13 PM
ssh and X-forwarding Björneborg Linux - Networking 2 02-19-2004 11:50 AM


All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration