LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-30-2007, 11:49 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
running ssh problem


Hi folks,


Ubuntu 7.04 server amd64
router IP - 192.168.0.10

Ubuntu 7.04 desktop
router IP - 192.168.0.11


Server can ssh desktop but desktop can't ssh server.


On desktop
$ ssh -Y satimis@192.168.0.10 rox
password:
Code:
....
(rox:5168): Gtk-warning ** Locale not supported by C library
Using the fallback 'C' locale
Server Rox does not display on desktop.


Any advice? TIA


satimis
 
Old 09-30-2007, 02:16 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
First check that basic ssh works. Does
Code:
ssh -Y satimis@192.168.0.10 /bin/bash
give you a shell on server? What does $DISPLAY contain after it? Does xterm succeed to run? Does this work better with untrusted X11 forwarding (-X instead of -Y)? Does rox run from such a session?
 
Old 09-30-2007, 08:12 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by raskin View Post
First check that basic ssh works. Does
Code:
ssh -Y satimis@192.168.0.10 /bin/bash
give you a shell on server? What does $DISPLAY contain after it? Does xterm succeed to run? Does this work better with untrusted X11 forwarding (-X instead of -Y)? Does rox run from such a session?
Tks for your advice.

On desktop
$ ssh -Y satimis@192.168.0.10 /bin/bash
satimis@192.168.0.10's password:

It just hangs here.


Ah would it be the problem of running xvt on server instead of xterm?


On server:

$ apt-cache policy xvt
Code:
xvt:
  Installed: 2.1-20
  Candidate: 2.1-20
  Version table:
 *** 2.1-20 0
        500 http://us.archive.ubuntu.com feisty/universe Packages
        100 /var/lib/dpkg/status
$ apt-cache policy xterm
Code:
xterm:
  Installed: (none)
  Candidate: 223-1
  Version table:
     223-1 0
        500 http://us.archive.ubuntu.com feisty/main Packages
        100 /var/lib/dpkg/status
If it is this cause, I'll

$ sudo apt-get remove xvt

then

$ sudo apt-get install xterm

TIA


B.R.
satimis
 
Old 09-30-2007, 10:00 PM   #4
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Problem still remains

Hi folks,


Performed following test:-

On server

$ sudo apt-get remove xvt
$ sudo apt-get install xterm

both went through w/o problem.


On desktop:-

$ ssh -Y satimis@192.168.0.10 rox
Code:
satimis@192.168.0.10's password: 

(process:5461): Gdk-WARNING **: locale not supported by C library

(rox:5461): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
$ ssh -Y satimis@192.168.0.10 /bin/bash
Code:
satimis@192.168.0.10's password:
Just hung here.


$ ssh -X satimis@192.168.0.10 rox
Code:
satimis@192.168.0.10's password: 

(process:5475): Gdk-WARNING **: locale not supported by C library

(rox:5475): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.

Problem is NOT solved


B.R.
satimis
 
Old 09-30-2007, 10:40 PM   #5
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
What do sshd logs on server contain? What does just 'ssh satimis@192.168.0.10' do?
 
Old 09-30-2007, 11:25 PM   #6
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by raskin View Post
What do sshd logs on server contain? What does just 'ssh satimis@192.168.0.10' do?
On Desktop

$ ssh satimis@192.168.0.10
satimis@192.168.0.10's password:
Code:
Linux ubuntu 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Last login: Mon Oct  1 12:13:56 2007 from 192.168.0.11
No remote server desktop displayed

$ cat /var/log/auth.log | grep sshd | less
Code:
.....
......
Oct  1 09:04:32 ubuntu sshd[4931]: Accepted password for satimis from 192.168.0.11 port 39662 ssh2
Oct  1 09:04:32 ubuntu sshd[4933]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 09:07:44 ubuntu sshd[4933]: (pam_unix) session closed for user satimis
Oct  1 09:13:40 ubuntu sshd[4969]: Accepted password for satimis from 192.168.0.11 port 54941 ssh2
Oct  1 09:13:40 ubuntu sshd[4971]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 09:13:54 ubuntu sshd[4971]: (pam_unix) session closed for user satimis
Oct  1 10:48:24 ubuntu sshd[5458]: Accepted password for satimis from 192.168.0.11 port 51409 ssh2
Oct  1 10:48:24 ubuntu sshd[5460]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 10:48:42 ubuntu sshd[5460]: (pam_unix) session closed for user satimis
Oct  1 10:49:07 ubuntu sshd[5464]: Accepted password for satimis from 192.168.0.11 port 51410 ssh2
Oct  1 10:49:07 ubuntu sshd[5466]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 10:57:23 ubuntu sshd[5466]: (pam_unix) session closed for user satimis
Oct  1 10:57:45 ubuntu sshd[5472]: Accepted password for satimis from 192.168.0.11 port 35486 ssh2
Oct  1 10:57:45 ubuntu sshd[5474]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 10:58:05 ubuntu sshd[5474]: (pam_unix) session closed for user satimis
Oct  1 12:01:07 ubuntu sshd[5531]: Accepted password for satimis from 192.168.0.11 port 36854 ssh2
Oct  1 12:01:07 ubuntu sshd[5556]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 12:02:22 ubuntu sshd[5556]: (pam_unix) session closed for user satimis
Oct  1 12:12:45 ubuntu sshd[5588]: Accepted password for satimis from 192.168.0.11 port 58368 ssh2
Oct  1 12:12:45 ubuntu sshd[5590]: (pam_unix) session opened for user satimis by (uid=0)
Oct  1 12:13:38 ubuntu sshd[5590]: (pam_unix) session closed for user satimis
Oct  1 12:13:56 ubuntu sshd[5610]: Accepted password for satimis from 192.168.0.11 port 58369 ssh2
Oct  1 12:13:56 ubuntu sshd[5612]: (pam_unix) session opened for user satimis by (uid=0)
(END)
satimis
 
Old 09-30-2007, 11:44 PM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Looks like 'ssh satimis@192.168.0.10' gives you a shell where you can actually type.. OK, does 'ssh -X satimis@192.168.0.10' do the same? (Try waiting 65 seconds after entering password, there are different timeouts to expire) Is your $HOME writable by you and clear of unwritable hidden files?
 
Old 10-01-2007, 02:10 AM   #8
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by raskin View Post
Looks like 'ssh satimis@192.168.0.10' gives you a shell where you can actually type.. OK, does 'ssh -X satimis@192.168.0.10' do the same? (Try waiting 65 seconds after entering password, there are different timeouts to expire)
Oh I got it.

On desktop
$ ssh satimis@192.168.0.1
and
$ ssh -X satimis@192.168.0.1

both did the same connecting the remote server

$ ls
displayed the files and directories on the server.


However ran;

$ leafpad
and
$ rox
displatying
Code:
(leafpad:5800): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
What does it mean?


Quote:
Is your $HOME writable by you and clear of unwritable hidden files?
Sorry I don't follow.

On server
$ ls -l
showing all files are owned by "satimis:satimis" and writable by their owner "-rw-r--r--"


B.R.
satimis

Last edited by satimis; 10-01-2007 at 02:11 AM.
 
Old 10-01-2007, 03:53 AM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
What your $LC_ALL and $LANG on server contain? Anyway, this should be ignorable - it is all about impossibility to meet your supposed country-specific tastes in data representation. It should start anyway. Does rox start when it is just run on server? About writable $HOME - I meant both on desktop and server, but probably it isn't the issue. Is leafpad a window manager, by the way? I do not know, but there are some classes of X programs that need to be the only program of the kind on the $DISPLAY . So it may be the cause.. Try running Xnest with xterm in it, and experiment there, so you will not have conflicts.
 
Old 10-01-2007, 04:47 AM   #10
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by raskin View Post
What your $LC_ALL and $LANG on server contain? Anyway, this should be ignorable - it is all about impossibility to meet your supposed country-specific tastes in data representation. It should start anyway.
Where to check them? On locale/locale.conf?

Quote:
Does rox start when it is just run on server?
Yes, no problem.

Quote:
About writable $HOME - I meant both on desktop and server, but probably it isn't the issue.
Yes, no problem at all on both desktop PC and server.

Quote:
Is leafpad a window manager, by the way? I do not know, but there are some classes of X programs that need to be the only program of the kind on the $DISPLAY . So it may be the cause..
No, it is a GUI text editor. I'm running Fluxbox as window manager/desktop.

Previously both of them worked without problem on this server which has been crashed before when I tried reinstalling "locale". Now this server is a fresh installation with same packages. Before crash "Ubuntu 7.04 desktop" can connect the server with "scp" and "ssh". Nothing has been touched on the desktop PC.

Quote:
Try running Xnest with xterm in it, and experiment there, so you will not have conflicts.
Sorry I don't follow. Is Xnest a package? I start xterm after starting X, the Fluxbox window manager.


B.R.
satimis
 
Old 10-01-2007, 05:30 AM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Check them just in console..
Code:
 echo $LC_ALL ; echo $LANG
Try running
Code:
export LC_ALL=C; export LANG=C
also. Xnest part is irrelevant now. Try also
Code:
 strace -f -o leafpad.strace leafpad
and post resulting leafpad.strace.

EDIT: and try running
Code:
xhost + 127.0.0.1
on desktop.
 
Old 10-01-2007, 05:46 AM   #12
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by raskin View Post
Check them just in console..
Code:
 echo $LC_ALL ; echo $LANG
Try running
Code:
export LC_ALL=C; export LANG=C
also. Xnest part is irrelevant now. Try also
Code:
 strace -f -o leafpad.strace leafpad
and post resulting leafpad.strace.

EDIT: and try running
Code:
xhost + 127.0.0.1
on desktop.
On server

$ echo $LC_ALL ; echo $LANG
Code:
en_US.UTF-8
$ export LC_ALL=C; export LANG=C
$ export LC_ALL=C ; export LANG=C
Both w/o printout.

$ strace -f -o leafpad.strace leafpad
leadpad started but w/o any printout on console.


On desktop
$ xhost + 127.0.0.1
Code:
127.0.0.1 being added to access control list
satimis
 
Old 10-01-2007, 01:25 PM   #13
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
So does leafpad start after all this (if you repeat attempt after xhost on desktop)? If not, try 'strace' way again, wait a minute, terminate it and post leafpad.strace.
 
Old 10-01-2007, 10:35 PM   #14
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by raskin View Post
So does leafpad start after all this (if you repeat attempt after xhost on desktop)? If not, try 'strace' way again, wait a minute, terminate it and post leafpad.strace.
Sorry I'm not clear of your advice. I don't have leafpad running on the desktop.


Performed following steps:-

On server;
$ echo $LC_ALL ; echo $LANG
Code:
en_HK.UTF-8
This time not "en_US.UTF-8". I did not touch anything on locale config.


$ export LC_ALL=C ; export LANG=C
No complaint.

$ strace -f -o leafpad.strace leafpad
started leafpad locally.


On desktop;
$ xhost + 127.0.0.1
Code:
127.0.0.1 being added to access control list
$ echo $LC_ALL ; echo $LANG
Code:
en_HK.UTF-8
$ export LC_ALL=C ; export LANG=C
No complaint.

$ ssh -Y satimis@102.168.0.10 leafpad
Code:
satimis@192.168.0.10's password
It hung there sometimes.

Then popup;
leafpad: cannot open display.


Remark: Rox, the file manager, is running on both server and desktop.


I found following mistake on server;

$ locale
Code:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_HK.UTF-8
LC_CTYPE="en_HK.UTF-8"
LC_NUMERIC="en_HK.UTF-8"
LC_TIME="en_HK.UTF-8"
LC_COLLATE="en_HK.UTF-8"
LC_MONETARY="en_HK.UTF-8"
LC_MESSAGES="en_HK.UTF-8"
LC_PAPER="en_HK.UTF-8"
LC_NAME="en_HK.UTF-8"
LC_ADDRESS="en_HK.UTF-8"
LC_TELEPHONE="en_HK.UTF-8"
LC_MEASUREMENT="en_HK.UTF-8"
LC_IDENTIFICATION="en_HK.UTF-8"
LC_ALL=
The first 3 lines are warning. How to fix them? Tks


Edit:

Performed following steps to fix the problem of above warning on the 3 lines mentioned;

$ sudo apt-get install language-pack-en-base
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  language-pack-en
Recommended packages:
  language-support-en
The following NEW packages will be installed:
  language-pack-en language-pack-en-base
......
......
Setting up language-pack-en (7.04+20070601) ...
Setting up language-pack-en-base (7.04+20070412) ...
Generating locales...
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... up-to-date
  en_ZA.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
$ locale
Code:
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
(Remark: what command shall I run here instead of a reboot ?

$ sudo dpkg-reconfigure locales
??? Tks )

Rebooted server.


$ locale
Code:
LANG=en_HK.UTF-8
LC_CTYPE="en_HK.UTF-8"
LC_NUMERIC="en_HK.UTF-8"
LC_TIME="en_HK.UTF-8"
LC_COLLATE="en_HK.UTF-8"
LC_MONETARY="en_HK.UTF-8"
LC_MESSAGES="en_HK.UTF-8"
LC_PAPER="en_HK.UTF-8"
LC_NAME="en_HK.UTF-8"
LC_ADDRESS="en_HK.UTF-8"
LC_TELEPHONE="en_HK.UTF-8"
LC_MEASUREMENT="en_HK.UTF-8"
LC_IDENTIFICATION="en_HK.UTF-8"
LC_ALL=
The warning on 3 lines gone.

$ echo $LC_ALL ; echo $LANG
Code:
en_HK.UTF-8
$ export LC_ALL=C ; export LANG=C
No complaint.

$ strace -f -o leafpad.strace leafpad
started leadpad


On desktop;

$ xhost + 127.0.0.1
Code:
127.0.0.1 being added to access control list
$ echo $LC_ALL ; echo $LANG
Code:
en_HK.UTF-8
$ export LC_ALL=C ; export LANG=C
No complaint.

$ ssh -Y satimis@192.168.0.10 leafpad
satimis@192.168.0.10's password

It just hung here sometimes and then;
leafpad: cannot open display.


satimis

Last edited by satimis; 10-02-2007 at 12:11 AM.
 
Old 10-02-2007, 07:29 AM   #15
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
I mean
Code:
 ssh -X satimis@192.168.0.10
strace -f -o leafpad.strace leafpad
Does it work and what does leafpad.strace contain?
 
  


Reply



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
Running GUI in SSH Towlies Linux - Newbie 10 05-17-2007 05:23 PM
Do I need ssh running? reesee Linux - Security 7 01-02-2006 10:01 PM
problem in running ssh command skvasistha Linux - General 1 11-29-2004 06:12 AM
running ssh on redhat 8.0 sheek Linux - Newbie 2 07-22-2003 06:46 PM
Running X through SSH cdakin Linux - Newbie 0 04-23-2002 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:46 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
Open Source Consulting | Domain Registration