Help needed..Enabling SSH in Linux when connecting with Xming locally
Linux - SoftwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
# 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
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.