全球主机交流论坛

标题: 你们玩小鸡都用root登录吗 [打印本页]

作者: qshng    时间: 2021-12-23 14:36
标题: 你们玩小鸡都用root登录吗
我反正是的,个人用我感觉没必要整什么sudo 太繁琐了,也不用证书,直接密码裸奔,分享下启用root密码登录命令:

  1. sed -i "s/^#PasswordAuthentication yes/PasswordAuthentication yes/" /etc/ssh/sshd_config
  2. sed -i "s/^PasswordAuthentication no/#PasswordAuthentication no/" /etc/ssh/sshd_config

  3. sed -i "s/^#PermitRootLogin yes/PermitRootLogin yes/" /etc/ssh/sshd_config
  4. sed -i "s/^PermitRootLogin no/#PermitRootLogin no/" /etc/ssh/sshd_config

  5. sed -i "s/^#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication yes/" /etc/ssh/sshd_config
  6. sed -i "s/^ChallengeResponseAuthentication no/#ChallengeResponseAuthentication no/" /etc/ssh/sshd_config

  7. systemctl restart sshd
复制代码

作者: optimism    时间: 2021-12-23 14:37
都行               
作者: wisdom    时间: 2021-12-23 14:37
root登陆,证书加改端口
作者: southsao    时间: 2021-12-23 14:37
一般情况下不用这个命令
只有甲骨文 GCP AWS等需要



/**
* 我手中的魔法
* 是守护挚爱的力量
* 是坚定这个信念所必须的力量
* 我一定会拯救你的
* 无论在何时、何地。
*
*
*/
作者: gtgc2005    时间: 2021-12-23 14:39
又不是生产环境,root不是最方便吗。就如同手机也要root一样,只是为了方便。
作者: 875    时间: 2021-12-23 14:50
这两天自己没事刚瞎写了个脚本  自动安装证书以及新建账号 root权限  git.io/875.sh  不嫌弃可以看看 非专业人士  看别人脚本参考瞎写的
作者: 等1下™我老公呢    时间: 2021-12-23 14:53
我是密钥root登录不用root密码登录
作者: LoliR    时间: 2021-12-23 15:01
不重要的,root 密码裸奔,重要的 SSO 单一认证 + WebSSH + 公钥 + 两步验证
作者: rin    时间: 2021-12-23 16:36
密钥就行了
作者: kezhao    时间: 2021-12-23 16:36
秘钥确实简单
作者: mikasa    时间: 2021-12-23 16:40
经历过一次误删根目录我就不用root了
作者: laogui    时间: 2021-12-23 16:40
root+密钥,怕个锤子
作者: 9501767    时间: 2021-12-23 16:48
又没存果照,怕啥




欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) Powered by Discuz! X3.4