CentOS 8 Stream SSH and VNC
CentOS and Red Hat add a few complexities on top of the “plain” Debian-based Linux distros one may be more likely to run on a laptop or Raspberry Pi. SELinux in particular is another layer to consider.
For SSH connection problems, suggest setting /etc/ssh/sshd_config to have
LogLevel DEBUG
then:
systemctl restart sshd.service
then:
journalctl -f
and try to login. This will print a good amount of information streaming and helps reveal .ssh/authorized_keys permissions issues and more.
In general, if one is puzzled if SELinux is causing an issue, as a last resort one may temporarily and carefully edit /etc/selinux/config to have
SELINUX=permissive
and reboot.
Be sure to put that back to enforcing
and reboot when done.
Check that firewalld is allowing the desired SSH port through.
tcpdump port 22 -n -Q inout
should show packets from the client–if not the SSH server firewall may be blocking them.
For VNC in general we avoid the fancy graphical desktop. To use the 2D simple “classic” desktop on VNC, edit ~/.vnc/xstartup to have:
export GNOME_SHELL_SESSION_MODE=classic
before the “xinitrc” line.
To check VNC server status:
systemctl status vncserver@:1
If VNC isn’t working for a user, check that their username is specied with a display number in file: /etc/tigervnc/vncserver.users