大佬们现在 GCP 不能第三方 ssh 直接 root+密码登录了么

2020-06-03 10:29:16 +08:00
 Dedicatus545
我记得以前网页 ssh 跑一次
sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config;sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config;reboot
然后改密码就能解决的
现在就是登录不上了 0.0
3456 次点击
所在节点    云计算
8 条回复
Dedicatus545
2020-06-03 11:02:17 +08:00
为什么没大佬鸟我
loukky
2020-06-03 13:18:42 +08:00
可以。不过我是手动改的
leishi1313
2020-06-03 13:20:55 +08:00
可以应该是可以,但是为什么要这样呢。直接用 ssh key 方便又安全
pppcx
2020-06-03 13:21:58 +08:00
stille
2020-06-03 13:23:04 +08:00
PasswordAuthentication 默认前面有注释,你只修改了 no 到 yes 没用.

我前几天还跑过脚本修改了 ssh root 登陆

sed -i '/PermitRootLogin/s/no/yes/g' /etc/ssh/sshd_config

sed -i '/#PasswordAuthentication yes/s/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config
X2031
2020-06-03 14:03:21 +08:00
可以
brendanliu
2020-06-03 14:06:48 +08:00
可以 在控制台添加 ssh 秘钥的时候 拥有者是 root@xxxx.com 就可以
brendanliu
2020-06-03 14:09:53 +08:00
@brendanliu 记得还得去 sshd_config 文件里面看一下配置

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/678138

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX