LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   running ssh problem (https://www.linuxquestions.org/questions/linux-server-73/running-ssh-problem-588418/)

satimis 09-30-2007 11:49 AM

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

raskin 09-30-2007 02:16 PM

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?

satimis 09-30-2007 08:12 PM

Quote:

Originally Posted by raskin (Post 2908548)
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

satimis 09-30-2007 10:00 PM

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

raskin 09-30-2007 10:40 PM

What do sshd logs on server contain? What does just 'ssh satimis@192.168.0.10' do?

satimis 09-30-2007 11:25 PM

Quote:

Originally Posted by raskin (Post 2908917)
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

raskin 09-30-2007 11:44 PM

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?

satimis 10-01-2007 02:10 AM

Quote:

Originally Posted by raskin (Post 2908959)
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

raskin 10-01-2007 03:53 AM

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.

satimis 10-01-2007 04:47 AM

Quote:

Originally Posted by raskin (Post 2909119)
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

raskin 10-01-2007 05:30 AM

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.

satimis 10-01-2007 05:46 AM

Quote:

Originally Posted by raskin (Post 2909170)
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

raskin 10-01-2007 01:25 PM

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.

satimis 10-01-2007 10:35 PM

Quote:

Originally Posted by raskin (Post 2909586)
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

raskin 10-02-2007 07:29 AM

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?


All times are GMT -5. The time now is 03:15 AM.