• 陪伴互联网运营小白共同探索成长,与IT爱好者共享探索乐趣
  • 建站只为分享,欢迎在PC端文章面打赏支持
  • 使用Ctrl+D 可收藏本站

一个命令允许root远程ssh登录

好玩有趣 陆子方 3个月前 (06-14) 233次浏览 0个评论 扫描二维码
文章目录[隐藏]

允许登录

sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && systemctl restart sshd

 

禁用登录

sed -i 's/PermitRootLogin yes/#PermitRootLogin prohibit-password/' /etc/ssh/sshd_config && systemctl restart sshd

子方有料原创丨转载请注明原文链接
期待您的评论或捐赠,这是最好的鼓励和支持!
喜欢 (0)
[赞赏使我快乐]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到