mosh-server needs a UTF-8 native locale to run
Clash Royale CLAN TAG#URR8PPP
I am trying to connect from my Gentoo to RHEL server. Both have mosh
installed, however I get this error:
petanb@localhost ~/Documents $ mosh root@server
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",
The client-supplied environment ([no charset variables]) specifies
the character set "US-ASCII".
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Connection to server closed.
/usr/bin/mosh: Did not find mosh server startup message.
On RHEL I have following locales:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
How can I fix this?
UPDATE: The problem seem to be on Gentoo side, connecting to debian server produces same error, connecting using other distros works.
UPDATE2: I fixed it by adding
LANG="en_US.UTF-8"
export LANG
into ~/.bashrc
ssh gentoo mosh
add a comment |
I am trying to connect from my Gentoo to RHEL server. Both have mosh
installed, however I get this error:
petanb@localhost ~/Documents $ mosh root@server
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",
The client-supplied environment ([no charset variables]) specifies
the character set "US-ASCII".
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Connection to server closed.
/usr/bin/mosh: Did not find mosh server startup message.
On RHEL I have following locales:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
How can I fix this?
UPDATE: The problem seem to be on Gentoo side, connecting to debian server produces same error, connecting using other distros works.
UPDATE2: I fixed it by adding
LANG="en_US.UTF-8"
export LANG
into ~/.bashrc
ssh gentoo mosh
For those using Ubuntu or any Debian like distro, here may be a solution.
– Pablo Bianchi
Feb 9 at 2:16
add a comment |
I am trying to connect from my Gentoo to RHEL server. Both have mosh
installed, however I get this error:
petanb@localhost ~/Documents $ mosh root@server
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",
The client-supplied environment ([no charset variables]) specifies
the character set "US-ASCII".
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Connection to server closed.
/usr/bin/mosh: Did not find mosh server startup message.
On RHEL I have following locales:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
How can I fix this?
UPDATE: The problem seem to be on Gentoo side, connecting to debian server produces same error, connecting using other distros works.
UPDATE2: I fixed it by adding
LANG="en_US.UTF-8"
export LANG
into ~/.bashrc
ssh gentoo mosh
I am trying to connect from my Gentoo to RHEL server. Both have mosh
installed, however I get this error:
petanb@localhost ~/Documents $ mosh root@server
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",
The client-supplied environment ([no charset variables]) specifies
the character set "US-ASCII".
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Connection to server closed.
/usr/bin/mosh: Did not find mosh server startup message.
On RHEL I have following locales:
# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
How can I fix this?
UPDATE: The problem seem to be on Gentoo side, connecting to debian server produces same error, connecting using other distros works.
UPDATE2: I fixed it by adding
LANG="en_US.UTF-8"
export LANG
into ~/.bashrc
ssh gentoo mosh
ssh gentoo mosh
edited May 22 '16 at 12:10
Petr
asked May 3 '16 at 12:33
PetrPetr
52221024
52221024
For those using Ubuntu or any Debian like distro, here may be a solution.
– Pablo Bianchi
Feb 9 at 2:16
add a comment |
For those using Ubuntu or any Debian like distro, here may be a solution.
– Pablo Bianchi
Feb 9 at 2:16
For those using Ubuntu or any Debian like distro, here may be a solution.
– Pablo Bianchi
Feb 9 at 2:16
For those using Ubuntu or any Debian like distro, here may be a solution.
– Pablo Bianchi
Feb 9 at 2:16
add a comment |
2 Answers
2
active
oldest
votes
mosh
uses the locale environment supported by ssh
. While mosh
apparently has no verbose- or debug-options, you can tell it what ssh
command to use when connecting and by adding a -vvv
option can have ssh
show what locale variables it sends.
For example, starting with
mosh -ssh='ssh -vvv' root@server
you might see
debug1: Sending env LC_ALL = C
debug2: channel 0: request env confirm 0
for POSIX, and
debug1: Sending env LC_CTYPE = en_US.UTF-8
debug2: channel 0: request env confirm 0
which show that the server confirms variables which are used. The remote sshd
may ignore some of your environment depending on the setting of AcceptEnv
in the configuration for sshd
— or your user's SendEnv
settings (in your ssh
configuration).
Not all servers accept your locale variables via ssh.
Even with the configuration setup permissively, it's still possible (particularly since you are connecting to the root user) that someone has decided that the locale for that user should be POSIX. For root, that makes some sense because you would get into less trouble by select/paste copying.
For example, some systems use /etc/profile.d/lang.sh
to set the locale for interactive use. That script differs from one system to another, and is the second place (after the ssh/sshd configurations) to consider when looking for an explanation why locale information is not passed to a remote system. With Red Hat (CentOS) the script attempts to get information from system- and home-configuration, e.g.,
if [ -n "$LANG" ]; then
saved_lang="$LANG"
[ -f "$HOME/.i18n" ] && . "$HOME/.i18n" && sourced=1
LANG="$saved_lang"
unset saved_lang
else
for langfile in /etc/locale.conf "$HOME/.i18n" ; do
[ -f $langfile ] && . $langfile && sourced=1
done
fi
SuSE is different, making assumptions about ssh and gdm before reading essentially the same files:
#
# lang.sh: Set interactive language environment
#
# Used configuration files:
#
# /etc/sysconfig/language
# $HOME/.i18n
#
#
# Already done by the remote SSH side
#
test -z "$SSH_SENDS_LOCALE" || return
#
# Already done by the GDM
#
test -z "$GDM_LANG" || return
For your particular servers (version not specified), the script may differ from one release to another. My Debian servers do not have that file - and rely upon the default system locale and gdm (which can differ) to set the interactive locale. Your ssh connection could use a different value with the system locale than an interactive session using X (via gdm). In that case, the system locale is the place to fix (see Locale in the Debian wiki).
add a comment |
Simple Solution
user@machine:~$ LC_ALL="en_US.UTF-8" mosh-server
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f280796%2fmosh-server-needs-a-utf-8-native-locale-to-run%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
mosh
uses the locale environment supported by ssh
. While mosh
apparently has no verbose- or debug-options, you can tell it what ssh
command to use when connecting and by adding a -vvv
option can have ssh
show what locale variables it sends.
For example, starting with
mosh -ssh='ssh -vvv' root@server
you might see
debug1: Sending env LC_ALL = C
debug2: channel 0: request env confirm 0
for POSIX, and
debug1: Sending env LC_CTYPE = en_US.UTF-8
debug2: channel 0: request env confirm 0
which show that the server confirms variables which are used. The remote sshd
may ignore some of your environment depending on the setting of AcceptEnv
in the configuration for sshd
— or your user's SendEnv
settings (in your ssh
configuration).
Not all servers accept your locale variables via ssh.
Even with the configuration setup permissively, it's still possible (particularly since you are connecting to the root user) that someone has decided that the locale for that user should be POSIX. For root, that makes some sense because you would get into less trouble by select/paste copying.
For example, some systems use /etc/profile.d/lang.sh
to set the locale for interactive use. That script differs from one system to another, and is the second place (after the ssh/sshd configurations) to consider when looking for an explanation why locale information is not passed to a remote system. With Red Hat (CentOS) the script attempts to get information from system- and home-configuration, e.g.,
if [ -n "$LANG" ]; then
saved_lang="$LANG"
[ -f "$HOME/.i18n" ] && . "$HOME/.i18n" && sourced=1
LANG="$saved_lang"
unset saved_lang
else
for langfile in /etc/locale.conf "$HOME/.i18n" ; do
[ -f $langfile ] && . $langfile && sourced=1
done
fi
SuSE is different, making assumptions about ssh and gdm before reading essentially the same files:
#
# lang.sh: Set interactive language environment
#
# Used configuration files:
#
# /etc/sysconfig/language
# $HOME/.i18n
#
#
# Already done by the remote SSH side
#
test -z "$SSH_SENDS_LOCALE" || return
#
# Already done by the GDM
#
test -z "$GDM_LANG" || return
For your particular servers (version not specified), the script may differ from one release to another. My Debian servers do not have that file - and rely upon the default system locale and gdm (which can differ) to set the interactive locale. Your ssh connection could use a different value with the system locale than an interactive session using X (via gdm). In that case, the system locale is the place to fix (see Locale in the Debian wiki).
add a comment |
mosh
uses the locale environment supported by ssh
. While mosh
apparently has no verbose- or debug-options, you can tell it what ssh
command to use when connecting and by adding a -vvv
option can have ssh
show what locale variables it sends.
For example, starting with
mosh -ssh='ssh -vvv' root@server
you might see
debug1: Sending env LC_ALL = C
debug2: channel 0: request env confirm 0
for POSIX, and
debug1: Sending env LC_CTYPE = en_US.UTF-8
debug2: channel 0: request env confirm 0
which show that the server confirms variables which are used. The remote sshd
may ignore some of your environment depending on the setting of AcceptEnv
in the configuration for sshd
— or your user's SendEnv
settings (in your ssh
configuration).
Not all servers accept your locale variables via ssh.
Even with the configuration setup permissively, it's still possible (particularly since you are connecting to the root user) that someone has decided that the locale for that user should be POSIX. For root, that makes some sense because you would get into less trouble by select/paste copying.
For example, some systems use /etc/profile.d/lang.sh
to set the locale for interactive use. That script differs from one system to another, and is the second place (after the ssh/sshd configurations) to consider when looking for an explanation why locale information is not passed to a remote system. With Red Hat (CentOS) the script attempts to get information from system- and home-configuration, e.g.,
if [ -n "$LANG" ]; then
saved_lang="$LANG"
[ -f "$HOME/.i18n" ] && . "$HOME/.i18n" && sourced=1
LANG="$saved_lang"
unset saved_lang
else
for langfile in /etc/locale.conf "$HOME/.i18n" ; do
[ -f $langfile ] && . $langfile && sourced=1
done
fi
SuSE is different, making assumptions about ssh and gdm before reading essentially the same files:
#
# lang.sh: Set interactive language environment
#
# Used configuration files:
#
# /etc/sysconfig/language
# $HOME/.i18n
#
#
# Already done by the remote SSH side
#
test -z "$SSH_SENDS_LOCALE" || return
#
# Already done by the GDM
#
test -z "$GDM_LANG" || return
For your particular servers (version not specified), the script may differ from one release to another. My Debian servers do not have that file - and rely upon the default system locale and gdm (which can differ) to set the interactive locale. Your ssh connection could use a different value with the system locale than an interactive session using X (via gdm). In that case, the system locale is the place to fix (see Locale in the Debian wiki).
add a comment |
mosh
uses the locale environment supported by ssh
. While mosh
apparently has no verbose- or debug-options, you can tell it what ssh
command to use when connecting and by adding a -vvv
option can have ssh
show what locale variables it sends.
For example, starting with
mosh -ssh='ssh -vvv' root@server
you might see
debug1: Sending env LC_ALL = C
debug2: channel 0: request env confirm 0
for POSIX, and
debug1: Sending env LC_CTYPE = en_US.UTF-8
debug2: channel 0: request env confirm 0
which show that the server confirms variables which are used. The remote sshd
may ignore some of your environment depending on the setting of AcceptEnv
in the configuration for sshd
— or your user's SendEnv
settings (in your ssh
configuration).
Not all servers accept your locale variables via ssh.
Even with the configuration setup permissively, it's still possible (particularly since you are connecting to the root user) that someone has decided that the locale for that user should be POSIX. For root, that makes some sense because you would get into less trouble by select/paste copying.
For example, some systems use /etc/profile.d/lang.sh
to set the locale for interactive use. That script differs from one system to another, and is the second place (after the ssh/sshd configurations) to consider when looking for an explanation why locale information is not passed to a remote system. With Red Hat (CentOS) the script attempts to get information from system- and home-configuration, e.g.,
if [ -n "$LANG" ]; then
saved_lang="$LANG"
[ -f "$HOME/.i18n" ] && . "$HOME/.i18n" && sourced=1
LANG="$saved_lang"
unset saved_lang
else
for langfile in /etc/locale.conf "$HOME/.i18n" ; do
[ -f $langfile ] && . $langfile && sourced=1
done
fi
SuSE is different, making assumptions about ssh and gdm before reading essentially the same files:
#
# lang.sh: Set interactive language environment
#
# Used configuration files:
#
# /etc/sysconfig/language
# $HOME/.i18n
#
#
# Already done by the remote SSH side
#
test -z "$SSH_SENDS_LOCALE" || return
#
# Already done by the GDM
#
test -z "$GDM_LANG" || return
For your particular servers (version not specified), the script may differ from one release to another. My Debian servers do not have that file - and rely upon the default system locale and gdm (which can differ) to set the interactive locale. Your ssh connection could use a different value with the system locale than an interactive session using X (via gdm). In that case, the system locale is the place to fix (see Locale in the Debian wiki).
mosh
uses the locale environment supported by ssh
. While mosh
apparently has no verbose- or debug-options, you can tell it what ssh
command to use when connecting and by adding a -vvv
option can have ssh
show what locale variables it sends.
For example, starting with
mosh -ssh='ssh -vvv' root@server
you might see
debug1: Sending env LC_ALL = C
debug2: channel 0: request env confirm 0
for POSIX, and
debug1: Sending env LC_CTYPE = en_US.UTF-8
debug2: channel 0: request env confirm 0
which show that the server confirms variables which are used. The remote sshd
may ignore some of your environment depending on the setting of AcceptEnv
in the configuration for sshd
— or your user's SendEnv
settings (in your ssh
configuration).
Not all servers accept your locale variables via ssh.
Even with the configuration setup permissively, it's still possible (particularly since you are connecting to the root user) that someone has decided that the locale for that user should be POSIX. For root, that makes some sense because you would get into less trouble by select/paste copying.
For example, some systems use /etc/profile.d/lang.sh
to set the locale for interactive use. That script differs from one system to another, and is the second place (after the ssh/sshd configurations) to consider when looking for an explanation why locale information is not passed to a remote system. With Red Hat (CentOS) the script attempts to get information from system- and home-configuration, e.g.,
if [ -n "$LANG" ]; then
saved_lang="$LANG"
[ -f "$HOME/.i18n" ] && . "$HOME/.i18n" && sourced=1
LANG="$saved_lang"
unset saved_lang
else
for langfile in /etc/locale.conf "$HOME/.i18n" ; do
[ -f $langfile ] && . $langfile && sourced=1
done
fi
SuSE is different, making assumptions about ssh and gdm before reading essentially the same files:
#
# lang.sh: Set interactive language environment
#
# Used configuration files:
#
# /etc/sysconfig/language
# $HOME/.i18n
#
#
# Already done by the remote SSH side
#
test -z "$SSH_SENDS_LOCALE" || return
#
# Already done by the GDM
#
test -z "$GDM_LANG" || return
For your particular servers (version not specified), the script may differ from one release to another. My Debian servers do not have that file - and rely upon the default system locale and gdm (which can differ) to set the interactive locale. Your ssh connection could use a different value with the system locale than an interactive session using X (via gdm). In that case, the system locale is the place to fix (see Locale in the Debian wiki).
edited May 22 '16 at 12:56
answered May 21 '16 at 20:46
Thomas DickeyThomas Dickey
53.7k5103175
53.7k5103175
add a comment |
add a comment |
Simple Solution
user@machine:~$ LC_ALL="en_US.UTF-8" mosh-server
add a comment |
Simple Solution
user@machine:~$ LC_ALL="en_US.UTF-8" mosh-server
add a comment |
Simple Solution
user@machine:~$ LC_ALL="en_US.UTF-8" mosh-server
Simple Solution
user@machine:~$ LC_ALL="en_US.UTF-8" mosh-server
answered Jun 14 '18 at 16:46
Antonio FeitosaAntonio Feitosa
1313
1313
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f280796%2fmosh-server-needs-a-utf-8-native-locale-to-run%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
For those using Ubuntu or any Debian like distro, here may be a solution.
– Pablo Bianchi
Feb 9 at 2:16