I have 2 servers which both are running on Ubuntu 18.04.4 LTS.
I managed to install shellinabox on one of them years ago, which automatically generates some files like certificate.pem
in /var/lib/shellinabox/
. However I can't remember what I did to make the server generate those files.
I run the following commands on the other server, as a tutorial suggests
sudo apt update
sudo apt install shellinabox
there is no certificates and firefox renders this error
The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.

the error page has only one option which is redirected to
https://support.mozilla.org/en-US/kb/secure-connection-failed-firefox-did-not-connect?as=u&utm_source=inproduct
Both servers use the same configuration for shellinabox, which generated by default.
SHELLINABOX_DAEMON_START=1
SHELLINABOX_PORT=4200
SHELLINABOX_ARGS="--no-beep"
with the working shellinabox, service shellinabox status
gives
● shellinabox.service - LSB: Shell In A Box Daemon
Loaded: loaded (/etc/init.d/shellinabox; generated)
Active: active (running) since Mon 2021-10-25 19:53:10 CST; 15h ago
Docs: man:systemd-sysv-generator(8)
Process: 943 ExecStart=/etc/init.d/shellinabox start (code=exited, status=0/SUCCESS)
Tasks: 2 (limit: 2122)
CGroup: /system.slice/shellinabox.service
├─1111 /usr/bin/shellinaboxd -q --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 4200 -u shellinabox -g shellinabo
└─1119 /usr/bin/shellinaboxd -q --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 4200 -u shellinabox -g shellinabo
Oct 25 19:53:09 VM-0-8-ubuntu systemd[1]: Starting LSB: Shell In A Box Daemon...
Oct 25 19:53:10 VM-0-8-ubuntu systemd[1]: Started LSB: Shell In A Box Daemon.
Oct 25 20:35:29 VM-0-8-ubuntu login[8061]: pam_securetty(login:auth): access denied: tty '/dev/pts/1' is not secure !
Oct 25 20:36:05 VM-0-8-ubuntu login[8061]: pam_unix(login:auth): check pass; user unknown
Oct 25 20:36:05 VM-0-8-ubuntu login[8061]: pam_unix(login:auth): authentication failure; logname=SHELLINABOX uid=0 euid=0 tty=/dev/pts/1 ruser
whereas the output from the one that is not working doesn't have the last three lines above, which I guess indicates the something for SSL configuration goes wrong.
How do I make shellinabox work?