Solve issue manpath: can’t set the locale; make sure $LC_* and $LANG are correct

When connect to centos from mac, it always report the follow error:

When connect to centos from mac, it always report the follow error:

manpath: can’t set the locale; make sure $LC_* and $LANG are correct

I solve the problem by set /etc/environment the following content:

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

But recently, it report this error again, and after I search the internet, and find the solution by comment the SendEnv LANG LC_* on file /etc/ssh/ssh_config , the content like below:

Host *
#SendEnv LANG LC_*

参考文档

manpath: can’t set the locale; make sure $LC_* and $LANG are correct