1、安裝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-keygen
設置ssh,打開登錄功能,保持默認配置即可。
編輯/etc/ssh/sshd_config文件:
RSAAuthentication yes
PubkeyAuthentication yes
另外,允許root通過 SSH 登錄看,如果禁止root遠程登錄,那就設置為 no :
PermitRootLogin yes
設置系統開機自啟openssh-server,開啟openssh-server:
使用MobaXterm連接遠程服務器。