Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cant connect to remote host through ssh X forwarding
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
anil_et
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2002
Posts: 98

PostPosted: Fri Dec 26, 2003 3:23 pm    Post subject: cant connect to remote host through ssh X forwarding Reply with quote

Hi
When I tried to connect from my winXp machine to Gentoo server through ssh X forwarding I get an error
Code:

anil@cuty ~
$ ssh -X -v 192.168.0.1
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.0.1 [192.168.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/anil/.ssh/identity type -1
debug1: identity file /home/anil/.ssh/id_rsa type -1
debug1: identity file /home/anil/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version
OpenSSH_3.7.1p2
debug1: match: OpenSSH_3.7.1p2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.7.1p2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.0.1' is known and matches the RSA host key.
debug1: Found key in /home/anil/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/anil/.ssh/identity
debug1: Trying private key: /home/anil/.ssh/id_rsa
debug1: Trying private key: /home/anil/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: password
anil@192.168.0.1's password:
                             debug1: Authentication succeeded
(password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
Warning: No xauth data; using fake authentication data for X11
forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
Last login: Sat Dec 27 02:10:35 2003 from 192.168.0.2
anil@puppy anil $ xmms
_X11TransSocketINETConnect: Can't get address for localhost

** CRITICAL **: Unable to open display


I am using the Cygwin xfree server on the winXP machine
Doing an echo
Code:

echo $DISPLAY
localhost:10.0

I am totally out of ideas :oops: :oops: :oops: Pls help
Anil
Back to top
View user's profile Send private message
gwlinden
n00b
n00b


Joined: 06 Jan 2003
Posts: 70
Location: Utrecht, The Netherlands

PostPosted: Fri Dec 26, 2003 4:32 pm    Post subject: Reply with quote

It seems to be a problem with your environment variables, or with your hostname resolution.

A couple of questions:
- Can you run a local X program in your cygwin shell? xclock for example?
- Do you set a DISPLAY variable somewhere? You should leave that to ssh, not define it yourself.
- What does 'hostname' tell you in a cygwin shell? It should not be localhost!

Hope this helps.
_________________
Gwendolyn
Back to top
View user's profile Send private message
jesterspet
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 215
Location: Atlanta

PostPosted: Fri Dec 26, 2003 8:47 pm    Post subject: Reply with quote

Do you have the following set in /etc/ssh/sshd_config:?:
Code:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
They are kinda needed to forward X11 connections.

Also, you have to have your cygwin xserver started before you conenct to your remote host.

ie.
Cygwin$ startx
and then from within X you issue your ssh -X -v 192.168.0.1
_________________
(X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95
Back to top
View user's profile Send private message
anil_et
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2002
Posts: 98

PostPosted: Sat Dec 27, 2003 1:17 am    Post subject: Reply with quote

Hi
Quote:

- Can you run a local X program in your cygwin shell? xclock for example?
- Do you set a DISPLAY variable somewhere? You should leave that to ssh, not define it yourself.
- What does 'hostname' tell you in a cygwin shell? It should not be localhost!


I can run local xprograms in the Cygwin and I didnot set any variable myself. Hostname in Cygwin says "cuty" my Laptop name.

Quote:
Do you have the following set in /etc/ssh/sshd_config


I have all that in the sshd_config
Anything more :oops: :oops:
Back to top
View user's profile Send private message
jesterspet
Apprentice
Apprentice


Joined: 05 Feb 2003
Posts: 215
Location: Atlanta

PostPosted: Sun Dec 28, 2003 3:26 am    Post subject: Reply with quote

Why is your local cygwin display set to 10:0 :?:

It should be 0:0 in most circumstances.

On my cygwin box a Local xterm has the display varable set to
Code:
:0.0


On my remote Gentoo box, the terminal has the display set to
Code:
localhost:10.0


I think, this is most likely the root of your issue. Get your varables right and you should be good to go.
_________________
(X) Yes! I am a brain damaged lemur on crack, and would like to buy your software package for $499.95
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum