Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-21-2012, 12:30 PM
|
#1
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Rep: 
|
Help needed..Enabling SSH in Linux when connecting with Xming locally
Hi,
Need your input on this.Should I be starting ssh service in a RHEL 5.5 server to able to display GUI for applications I run on server?. Iam using Xming Windows Server locally from my Windows XP machine and iam connecting to the Linux server using Putty.
Thanks in advance
Alice
|
|
|
|
03-21-2012, 03:02 PM
|
#2
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
Hi,
ssh would be a sensible way of redirecting output from the RHEL box to
your windows machine. So yes, starting the ssh service is essential.
Cheers,
Tink
|
|
|
|
03-21-2012, 03:26 PM
|
#3
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
Thanks
Iam trying to start the ssh service using /etc/init.d/sshd start. but when I debug it using sshd -d command i gives an error
Bind to port 22 on 0.0.0.0 failed: Address already in use.
Cannot bind any address.
I tried to enable SO_REUSEADDR option by disabling X11UseLocalHost but no good.
Let me know if you have any ideas on this.
|
|
|
|
03-21-2012, 03:29 PM
|
#4
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
well ... is sshd already running?
pgrep -l sshd
If it's running, what does its configuration file look like?
cat /etc/ssh/sshd_config
Cheers,
Tink
|
|
|
|
03-21-2012, 03:40 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
I used the comamnd to check if its running and it listed two ports
3059 sshd
22838 sshd
but I thought sshd -d lists whether ssh started or not so does this indicate it is started?
and this how my sshd_config file looks
# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
Port 22
Protocol 2,1
ListenAddress 0.0.0.0
# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes
# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
X11UseLocalhost no
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
|
|
|
|
03-21-2012, 03:49 PM
|
#6
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
It's certainly running, and the fact that there's two instances suggests that
someone is actually connected.
What you need to do to be able to use X11 remotely is to un-comnent
#X11Forwarding no
and change it to
X11Forwarding yes
(or copy the line, or manually add it, or whatever is considered best
practice in your organisation ...) and restart the service.
service sshd restart
Note that this will NOT kill existing connections (however, they will
not benefit from the config change).
Cheers,
Tink
|
|
|
|
03-21-2012, 04:01 PM
|
#7
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
Thanks
yepp did it but sshd -d command shows the error but i guess if the ssh is running I guess its fine.
The main reason i started looking at the ssh service is when i launch applications in Linux server it was giving this error
Loading of com.teamcenter.install.insweb.gui.TextBundle_en_US ... attempted.
Loading of com.teamcenter.install.insweb.gui.TextBundle succeeded.
Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.Window.init(Window.java:379)
at java.awt.Window.<init>(Window.java:432)
at java.awt.Frame.<init>(Frame.java:403)
at javax.swing.JFrame.<init>(JFrame.java:207)
at com.teamcenter.install.common.gui.ChildFrame.<init>(ChildFrame.java:26)
at com.teamcenter.install.common.gui.OKCancelFrame.<init>(OKCancelFrame.java:58)
at com.teamcenter.install.insweb.gui.MsgWindow.<init>(MsgWindow.java:53)
at com.teamcenter.install.insweb.gui.MsgWindow.<init>(MsgWindow.java:45)
at com.teamcenter.install.insweb.gui.StatusWindow.<init>(StatusWindow.java:34)
at com.teamcenter.install.insweb.gui.StatusWindow._getSingleton(StatusWindow.java:82)
at com.teamcenter.install.insweb.gui.Insweb.main(Insweb.java:59)
and this started popping up after a server reboot. So I was not sure if some service needs to be started manually on my server to enable X11forwarding. But looks like after the changes to the sshd_config file it looks no good.
|
|
|
|
03-21-2012, 04:14 PM
|
#8
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
Quote:
Originally Posted by linuxuser2k11
Thanks
yepp did it but sshd -d command shows the error but i guess if the ssh is running I guess its fine.
|
Which error?
|
|
|
|
03-21-2012, 04:15 PM
|
#9
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
Bind to port 22 on 0.0.0.0 failed: Address already in use.
Cannot bind any address.
|
|
|
|
03-22-2012, 09:37 AM
|
#10
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
any ideas..thanks
|
|
|
|
03-22-2012, 12:21 PM
|
#11
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,903
|
Sorry, from the posts above I'm uncertain as to what the current issue might be?
|
|
|
|
03-22-2012, 03:20 PM
|
#12
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
Fixed
i guess the solution lies in beginning some services and ensuring them they start.
1) As you know I had sshd process started through /etc/init.d/sshd start
2) Then start Xfs in the server -- /etc/init.d/xfs start
3) if you are getting a unix:/7100 error when typing startx
I commented the line FontPath= unix/:7100 in /root/xorg.conf.new (or if xfs fails start this was some fonts erver which was causing a problem too)
4)Now in my case its started setting DISPLAY variable to localhost:10.0
5) then all I had to do was in my local machine I opened a Cygwin bash shell then put in "export DISPLAY=localhost:10.0". Then when I launched my application it began to load through.
--The weird part was that In Cygwin bash shell I had to do that explicitly to launch it first time. But then I started up Xming next and I never used export command again and it automatically launched. i guess once its set up you don't need the export command again.
some other changes i made was I changed the user permission on .Xauthority file . Not sure if this also impacted it but I guess it was the Xfs service that made a difference.
hope it helps for someone for spent some long time on it.
|
|
|
|
03-22-2012, 03:29 PM
|
#13
|
|
LQ Newbie
Registered: Mar 2012
Posts: 11
Original Poster
Rep: 
|
Thanks for the help tinkster..!!!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:31 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|