On a freshly installed CentOS 7 machine, I got the following notice when I SSH’d into the server. warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory The fix is pretty straight-forward. On the server (not your client), edit the file /etc/environment and add the following lines. (You’ll need root privileges to do this) $ cat /etc/environment LANG=en_US.utf-8 LC_ALL=en_US.utf-8 Log out & back in and you should notice the warning message is gone.
Bài đăng phổ biến từ blog này
If you are on Linux system and you want connect to an SSH server on port 26 you can use the following command. ssh [email protected] -p PORT Note: Replace server IP with the IP Address or DNS name of your server. Change your port number as you have set. If you are using custom port SSH then same port most be allowed for outbound, inbound connection on firewall otherwise the connection will not establish
I am pretty new to CentOS but the most logical way (at least to me) seemed to be to add your ip address (in my case 192.168.0.22 (static)) to the trusted zone and remove ssh from the public zone: firewall-cmd --permanent --add-source=192.168.0.22 --zone=trusted firewall-cmd --permanent --add-service=ssh --zone trusted firewall-cmd --permanent --remove-service=ssh --zone-public firewall-cmd --reload My thoughts were that you only add ports and services like http and https to 'public' and keep the risky stuff on 'trusted' tied to the (static) ip address of the computer you use for access. So if your ip is 22.214.171.124 you can access all services listed in trusted and if your ip is anything other than 192.168.0.22 then you can only access the restricted set of services in the public zone e.g. http and https. This seems incredibly simple compared to other solutions but worked great for my tests and keeps everything neat - isn't that the whole purpose of zones or have I c