本文最后更新于 2023-05-14,文章内容可能已经过时。

安装openssh和openssh-server

dnf -y install openssh
dnf -y install openssh-server

卸载openssh和openssh-server

dnf -y remove openssh
dnf -y remove openssh-server

设置ssh,打开登录功能,保持默认配置即可。
编辑/etc/ssh/sshd_config文件:

RSAAuthentication yes
PubkeyAuthentication yes

允许root通过 SSH 登录,如果禁止root远程登录,那就设置为 no

PermitRootLogin yes