Why Am I Seeing Login Errors of Code: C_515 When I Use a Web Browser for Resource O&M?
Symptoms
When a user attempts to log in to a Linux host using a web browser, a login error (Code: C_515) is reported, indicating that an error occurs and the user can try again or contact the administrator.
Possible Causes
- Cause 1: The number of incorrect password attempts exceeds the upper limit for Linux hosts. As a result, the CBH IP address is added to the /etc/hosts.deny file.
- Cause 2: Host Security Service (HSS) is enabled on the Linux host. After multiple login attempts with incorrect passwords, the internal IP address of CBH is added to the /etc/sshd.deny.hostguard file by HSS.
- Cause 3: CBH does not support the SSH algorithms used by host OSs. (Only for CBH earlier than V3.3.38)
Removing Restriction from /etc/hosts.deny
- Log in to the Linux Server as an administrator.
- Run the following command to view the /var/log/secure log and check whether the host rejects the IP address of the CBH instance:
cat /var/log/secure
- Run the following command to edit the /etc/hosts.deny file and delete the IP address of the CBH instance from the file:
vim /etc/hosts.deny
- (Optional) Whitelist the CBH IP address.
To use the CBH instance properly, run the following command to edit the /etc/hosts.allow file on the Linux host and allow all CBH IP addresses to log in to the host:
vim /etc/hosts.allow
Removing IP Address Restrictions from HSS
- View the /etc/sshd.deny.hostguard file.
- Log in to the Linux Server as an administrator.
- Run the following command to query the /etc/sshd.deny.hostguard file:
cat /etc/sshd.deny.hostguard
- Run the following command to open the /etc/sshd.deny.hostguard file:
vim /etc/sshd.deny.hostguard
- Check whether the /etc/sshd.deny.hostguard file contains the CBH internal IP address.
- On the HSS management console, remove the IP address restriction.
- Log in to the HSS console.
- Choose Intrusions > Events.
- In the Alarm Statistics area, click Blocked IP Addresses.
- Locate and select the row that contains the CBH internal IP address, and click Unblock above the upper left corner of the list.
- (Optional) Whitelist the CBH IP address.
On the HSS console, whitelist the CBH IP address on the Linux server.
![](https://support.huaweicloud.com/intl/en-us/cbh_faq/public_sys-resources/note_3.0-en-us.png)
Using CBH to manage passwords of host accounts and periodically synchronize accounts can prevent the CBH IP address from being blacklisted caused by entering incorrect passwords or using of unsynchronized zombie accounts.
Removing SSH Algorithm Restrictions
- Check the server configuration file /etc/ssh/sshd_config.
- Log in to the Linux Server as an administrator.
- Run the following command to query the /etc/ssh/sshd_config file:
cat /etc/ssh/sshd_config
- Run the following command to open the /etc/ssh/sshd_config file:
vim /etc/ssh/sshd_config
- Modify the algorithm by adding the following command to the end of the HostKeyAlgorithms line:
ssh-rsa,ssh-dss
If the HostKeyAlgorithms line cannot be found in your default configuration file, use this command instead: HostKeyAlgorithms ssh-rsa,ssh-dss.
- Run the following command to restart the SSH service:
systemctl restart sshd
If the problem persists, click Service Tickets in the upper right corner of the management console and submit a service ticket.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot