Home Linux ServerEmail Server Fix system failure exception executing command on Zimbra mail

Fix system failure exception executing command on Zimbra mail

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

I. Cause

Fix system failure exception executing command on Zimbra mail

Because the VPS or server does not use the default SSH port 22, the Zimbra configuration always uses port 22 to monitor.

While accessing email queues or monitoring graphs and other services, the server will sometimes give an error saying “Server error encountered” with a system error during authentication.

II. Implementation Guide

1. Generate SSH and update the SSH key on the server

To regenerate the ssh keys, you use the following command with the zimbra user.

AZDIGI Tutorial
[root@webmail ~]# su zimbra
[zimbra@webmail ~]$ cd && zmsshkeygen
    
AZDIGI Tutorial
Generating public/private rsa key pair.
Your identification has been saved in /opt/zimbra/.ssh/zimbra_identity.
Your public key has been saved in /opt/zimbra/.ssh/zimbra_identity.pub.
The key fingerprint is:
SHA256:yolGi/6hcCcUKDqihNx8yjh0p6HCca2rxi6E73t8IA8 webmail.azdigi.online
The key's randomart image is:
+---[RSA 2048]----+
|                 |
| .               |
|o .              |
|= o..            |
|*=.*.+  S        |
|B+EoO+ o         |
|**+X*.+          |
|o*o==..          |
|++*=..           |
+----[SHA256]-----+
    

Next, you use the command below to update the ssh key on the VPS/server.

AZDIGI Tutorial
[zimbra@webmail ~]$ zmupdateauthkeys
    
AZDIGI Tutorial
Updating keys for webmail.azdigi.online
Fetching key for webmail.azdigi.online
Updating keys for webmail.azdigi.online
Updating /opt/zimbra/.ssh/authorized_keys
    

2. Check and update the SSH port

If you have a configuration to change the ssh port to another port, you need to update the zimbraRemoteManagementPort property on the VPS/server to the port you configured to change!

You use the command as below to change:

AZDIGI Tutorial
[zimbra@webmail ~]$ zmprov ms webmail.azdigi.online zimbraRemoteManagementPort 2022
    
  • webmail.azdigi.online: change to hostname on your VPS/server.
  • 2022: replace the ssh port that you have configured to change.

Next, add the following configuration line to the /etc/ssh/sshd_config file to allow user zimbra.

Since you were using the zimbra user before, you need to log out of the user and use the root user to be able to change the sshd_config file configuration.

AZDIGI Tutorial
[zimbra@webmail ~]$ exit
exit
[root@webmail ~]# vi /etc/ssh/sshd_config
    
AZDIGI Tutorial
#       $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 2022
AllowUsers root admin zimbra      # Thêm dòng này vào file.
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
:wq
    

After adding the sshd_config file is complete, save and exit with the command :wq => restart the sshd service.

AZDIGI Tutorial
[root@webmail ~]# systemctl restart sshd
    

Wishing you success!

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign