In an attempt to improve security on Ubuntu 20.04 server I disabled pw login follwing this article: https://www.cyberciti.biz/faq/how-to-disable-ssh-password-login-on-linux/
It works, but the sysinfo does not show up anymore on SSH login:
% ssh server
Last login: Sun Mar 6 21:07:05 2022 from 77.2.170.244
The steps included:
$ sudo vi /etc/ssh/sshd_config
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
PermitRootLogin no
PermitRootLogin prohibit-password
How can I reenable landscape-sysinfo ?
What is taken by one hand can be provided back by the other:
UsePAM no
disables everything usually handled by PAM. This include this piece of configuration in
/etc/pam.d/sshd
:One can enable back a part of it with
PrintMotd yes
:This option is specifically set to
no
on systems whereUsePAM yes
is set (such as Debian or Ubuntu) to avoid a double motd on login. It can be enabled back. There won't be the dynamic part (which among other things might display the number of packages that can be upgraded).So you should change the configuration to also have
PrintMotd yes
.