LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-13-2008, 04:37 PM   #1
gallard
LQ Newbie
 
Registered: May 2008
Posts: 11

Rep: Reputation: 3
Locale problem with SSH


On my laptop, I have Mandriva 2008. Locale is fr_CA.UTF-8.
I have to maintain/manage a server running Mandriva 2006 where the locale is fr_CA.ISO8859-1.
When I use ssh to communicate with the server, all accented characters in the server files are unrecognized and displayed with a question mark.
So, I need a way to set both machines on the same locale or to provide realtime translations between the two.

Questions
- how can I do it?
- on which machine?

Note: upgrading the whole server to UTF8 is not an acceptable solution. Downgrading the laptop to ISO-8859-1 permanently is not acceptable either.
 
Old 05-15-2008, 08:32 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Is the issue simply passing the LANG variable to the server? SSH is supposed to automatically do this by default but there is, or at least used to be, a bug if sshd is set up to use PAM for authentication. If that is the problem, one option would be to enter and export the LANG variable after logging in. You could automate that by having .bash_profile (or /etc/bash_profile) check if you are logging in via SSH, and optionally check for the host name you are logging in from.
 
Old 05-15-2008, 02:37 PM   #3
gallard
LQ Newbie
 
Registered: May 2008
Posts: 11

Original Poster
Rep: Reputation: 3
Thanks BlackHole54
I will try it next time I go to that site.
But I still need more info:
- you said: "export the LANG variable". Should I set it to ISO-8859-1 or UTF-8?
- Mandriva also use the LANGUAGE environment variable. Would it be better than LANG?
 
Old 05-16-2008, 02:23 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by gallard View Post
- you said: "export the LANG variable". Should I set it to ISO-8859-1 or UTF-8?
I would think you would want to set it to fr_CA.UTF-8 to match your laptop. I am no expert here ..

Quote:
- Mandriva also use the LANGUAGE environment variable. Would it be better than LANG?
Sorry, I don't know anything about the LANGUAGE variable. TMK, LANG is what you want. But I have never used Mandriva.
 
Old 10-13-2008, 08:21 AM   #5
fazulas
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Hi,

Make sure that /etc/ssh/ssh_config in the client includes the line
SendEnv LANG LC_*

and that /etc/ssh/sshd_config in the server includes the line
AcceptEnv LANG LC_*

This sorted out the obnoxious issue of the question marks for me.

My ssh version (just in case):
OpenSSH_5.1p1 Debian-3, OpenSSL 0.9.8g 19 Oct 2007

Enjoy.
 
  


Reply

Tags
charset, locale, ssh


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
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 10 03-24-2013 09:35 PM
after-Installation errors. locale error. unsupported locale settings and two more gh0st Fedora 1 05-02-2008 06:06 AM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 04-01-2006 12:38 AM


All times are GMT -5. The time now is 04:43 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration