文章目录
  1. 1. LC_CTYPE: cannot change locale (UTF-8)
  2. 2. Write failed: Broken pipe

Linux版本:Centos6.5
Mac版本:OS X Yosemite 10.10.2

LC_CTYPE: cannot change locale (UTF-8)

通过ssh连接到linux,会出现如下警告:

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

这是由于没有找到对应的语言环境导致的:
按一下命令步骤操作即可修复:
首先

sudo vi /etc/ssh_cofig

然后将该文件中的SendEnv LANG LC_*这一行用#进行注释

#SendEnv LANG LC_*

参考:OS X Terminal: -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory Fix

Write failed: Broken pipe

通过ssh连接到linux,有时候会莫名其妙的出现错误:

Write failed: Broken pipe

看资料说的是由于长时间未操作造成的,解决方法为在Mac端的~/.ssh/config文件中添加:

ServerAliveInterval 60

参考:解决ssh的”Write failed: Broken pipe”问题

文章目录
  1. 1. LC_CTYPE: cannot change locale (UTF-8)
  2. 2. Write failed: Broken pipe