Error: SSH CONN ERROR: Cannot read property bold of undefined
How to fix "SSH CONN ERROR: Cannot read property 'bold' of undefined" error in Ezeelogin WebSSH
Refer below article to configure and troubleshoot WebSSH in Ezeelogin.
https://www.ezeelogin.com/kb/article/setup-web-ssh-console-in-ezeelogin-and-ssh-via-browser-180.html
https://www.ezeelogin.com/kb/article/could-not-setup-ezeelogin-web-ssh-service-156.html
Start the WebSSH Console node application manually to determine any errors.
root@gateway ~]# DEBUG=* PORT=52222 node $(awk '/^system_folder/ {print $2}' /usr/local/etc/ezlogin/ez.conf)/application/external/webssh/index.js
WebSSH2 Logout: user=eztest from=192.168.1.1 host=127.0.0.1 port=36000 sessionID=undefined/uZDvv6Fk6KiLwsOcAAAA allowreplay=undefined term=xterm-color socket.io:client ignoring packet write {"type":2,"data":["ssherror","SSH CONN END BY HOST: All configured authentication methods failed"],"nsp":"/"} +2ms
In the above example, user eztest is trying to access the webssh console and it showed "SSH CONN ERROR: Cannot read property 'bold' of undefined" in the console.
In debug, it showed "All configured authentication methods failed" for the same user eztest.
Follow below steps to fix the above error:
1. Try to manually ssh from the gateway machine as the Ezeelogin user to localhost to confirm it is working. Also, make sure password authentication is enabled for the Ezeelogin users.
root@gateway ~]# ssh ezlogin_user@localhost
2. If the user cannot manually ssh, then allow Ezeelogin user group in the configuration file to fix the above error. Add below line under Match Address 127.0.0.1.
root@gateway ~]# vim /etc/ssh/sshd_config
Match Address 127.0.0.1
PubkeyAuthentication yes
PasswordAuthentication yes
Allowgroups ezuser
3. Restart SSH daemon and try to ssh from the gateway machine as the Ezeelogin user to localhost to confirm it's working fine (refer step 1). Then click on the webssh icon on the Ezeelogin software GUI to make sure it works.