LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 08-01-2006, 04:04 PM   #1
Windowns
LQ Newbie
 
Registered: Aug 2006
Distribution: Solaris 9, Fedora Core
Posts: 15

Rep: Reputation: 0
Unable to get X11 port forwarding to work in SSH


I'm trying to get X11 port forwarding over SSH to work. This will hopefully ultimately enable me to connect to the linux box from home and export the display onto my windows box at home (xclock, xterm, etc)

I have reviewed the "Similar threads" before posting an didnt see anything, in addition i've been googling for 2+ hours now.

I have both x-Win32 and cygwin-x on my system. I need to get this working with X-Win32 as we have a consultant using that x-windows server.

I've already modified my sshd_config file and rebooted my system. New config file reads:

X11Forwarding yes
X11DisplayOffset 10

I've tried adding the "X11UseLocalhost yes" setting, but it is not recognized by the sshd service.

Needless to say that no matter what i do, i get an event log message (using putty to connect) saying that:

"X11 forwarding refused"

then later i get a message "Server unexpectedly closed network connection" and i am unable to interact in putty.

Now if i change the setting "X11Forwarding yes" to "X11Forwarding no" then i will still get the message:

"X11 forwarding refused"

but i dont get the "Server unexpectedly closed network connection" message and i am still able to interact with the system via putty.

I'm definately stumped on this one. Any help would be greatly appreciated.
 
Old 08-01-2006, 04:20 PM   #2
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,458

Rep: Reputation: 85
You don't have to change any of the configurations. Give this command to use X forwarding with ssh.
Code:
ssh -X -l username hostname
 
Old 08-01-2006, 04:28 PM   #3
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,458

Rep: Reputation: 85
Also make sure you have X installed in cygwin, and any other graphics libraries that might be needed. If you are trying to forward apps that run in gnome, then install gnome in cygwin, so that you get the graphics libraries needed. If you are using the Openssh server for Windows from this website http://sshwindows.sourceforge.net/, that won't work because it installs the minimal cygwin software needed to get ssh working and is not enough to forward X.

Last edited by fakie_flip; 08-01-2006 at 04:29 PM.
 
Old 08-02-2006, 09:56 AM   #4
Windowns
LQ Newbie
 
Registered: Aug 2006
Distribution: Solaris 9, Fedora Core
Posts: 15

Original Poster
Rep: Reputation: 0
ok, i tried what you asked (ssh -X -I username@hostname) and i still see the connection coming back from the server to port 6000 on my system. X-Win32 sits on port 6000 and waits for incoming connections. X-Win32 is my x-windows server that is installed on my system.

If i type simply "ssh username@hostname" (note NO port forwarding) it all behaves the same way. My remote solaris server will connect back to my box on port 6000. I need that communication to come back through the ssh tunnel.

Fakie_flip, thanks for the advise, i already had cygwin-x installed on my system. I also have X-Win32 which does the same thing.

Overall i cannot use the ssh command as my remote technitian does not have cygwin installed on his system. It conflicts with other applications installed. He uses putty to SSH into the solaris box. He also bought X-Win32 to use as his x-windows server.

So, in the end i need this to work with putty and X-Win32. If that is impossible then i need to find a way to simply get X11 port forwarding to work. So all of my X11 communications come through the ssh tunnel.

Thanks for the ideas and help so far.
 
Old 08-02-2006, 06:05 PM   #5
Windowns
LQ Newbie
 
Registered: Aug 2006
Distribution: Solaris 9, Fedora Core
Posts: 15

Original Poster
Rep: Reputation: 0
Well, i got it working now. The problem was with my SSH server installed on the solaris box. I applied a patch cluster, and X11 port forwarding works now! Oh and i've added the line:

X11UseLocalhost yes line to the sshd_config file. sshd will start up with that option in the config file.
 
Old 08-13-2006, 09:06 AM   #6
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,458

Rep: Reputation: 85
good, im glad you figured it out
 
Old 09-26-2006, 08:18 AM   #7
nixomose
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
same thing

I am running sunos 5.10 and am having the same problem.
I've got this
# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

in my sshd config but putty says
X11 forwarding refused

and there's nothing on the server side to say why.
What patch did you apply? Or what else might you have done to get that working?
 
Old 09-26-2006, 09:28 AM   #8
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,458

Rep: Reputation: 85
Thumbs down

You can't have all the features of Linux/GNU SSH w/Putty. If you want X forwarding w/SSH, use Linux instead of Winblows.

Last edited by fakie_flip; 09-26-2006 at 09:31 AM.
 
Old 09-26-2006, 10:09 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,773

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
Quote:
Originally Posted by fakie_flip
If you want X forwarding w/SSH, use Linux instead of Winblows.
Or install an X11 server on your Windows box, like the one bundled with cygwin ( http://xfree.cygwin.com/ )
Or use an O/S that support X11 natively, like *BSDs, Solaris, macOS X, etc ... and Gnu/Linux obviously
 
Old 09-26-2006, 10:34 AM   #10
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,458

Rep: Reputation: 85
It's best to use Linux instead of Winblows.
 
Old 09-26-2006, 10:50 AM   #11
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,773

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
What is the best solution for you isn't necessarily the best for someone else.
The question was about SSH X forwarding from Windows to Solaris, not about what is the best O/S to use as a SSH client.

You first gave a wrong answer: "You can't have all the features of Linux/GNU SSH w/Putty." Putty support X11 forwarding, it has a checkbox to enable it.

Then you give an unhelpful opinion.
 
Old 09-26-2006, 10:57 AM   #12
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,458

Rep: Reputation: 85
You don't ever shut up do you? I have a life outside of LQ at college and with over 4000 posts, I can see you do not even though you may be definsive about that. I'm not going to reply to your posts anymore. I'll be the mature one and be the first one to stop replying to ignorance.

Last edited by fakie_flip; 09-26-2006 at 01:36 PM.
 
Old 09-26-2006, 12:22 PM   #13
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,773

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
You'd rather stop giving innacurate / misleading / childish / offensive answers to people posting in this forum.
 
Old 09-26-2006, 02:05 PM   #14
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
Thumbs down

Man, these forums have really gone down. Everybody knows jlliagre is the most helpful guy around on Solaris. Give him a break.

It would be nice if people could just focus on the issues instead of jumping all over each other.

(However in principle I agree that it's a good suggestion to not ever use winbloze for anything )

How much do I have to pay to get out of these forums?
 
Old 09-26-2006, 02:17 PM   #15
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Tribblix, Ubuntu/WSL
Posts: 9,773

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
Quote:
Originally Posted by Randux
(However in principle I agree that it's a good suggestion to not ever use winbloze for anything )
So do I by the way
 
  


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
root ssh X11 forwarding kpachopoulos Linux - Networking 6 04-30-2006 09:51 AM
Need HELP SSH X11 Forwarding wylie1001 Linux - Software 2 04-11-2006 08:12 PM
Using SSH port forwarding reports success but seems not to work. karlmdv Linux - Networking 2 02-02-2006 12:32 AM
X11 forwarding over SSH SirSlappy Linux - Networking 1 10-18-2005 01:37 PM
Problems with ssh and X11 forwarding Dabria Linux - General 5 02-13-2004 10:28 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:03 PM.

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