CentOS 8 配置 ssh


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连接远程服务器。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM