V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
Dedicatus545
V2EX  ›  云计算

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

  •  
  •   Dedicatus545 · 2020-06-03 10:29:16 +08:00 · 3415 次点击
    这是一个创建于 1415 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我记得以前网页 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
    8 条回复    2020-06-03 14:09:53 +08:00
    Dedicatus545
        1
    Dedicatus545  
    OP
       2020-06-03 11:02:17 +08:00
    为什么没大佬鸟我
    loukky
        2
    loukky  
       2020-06-03 13:18:42 +08:00 via Android
    可以。不过我是手动改的
    leishi1313
        3
    leishi1313  
       2020-06-03 13:20:55 +08:00
    可以应该是可以,但是为什么要这样呢。直接用 ssh key 方便又安全
    pppcx
        4
    pppcx  
       2020-06-03 13:21:58 +08:00
    stille
        5
    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
        6
    X2031  
       2020-06-03 14:03:21 +08:00
    可以
    brendanliu
        7
    brendanliu  
       2020-06-03 14:06:48 +08:00
    可以 在控制台添加 ssh 秘钥的时候 拥有者是 [email protected] 就可以
    brendanliu
        8
    brendanliu  
       2020-06-03 14:09:53 +08:00
    @brendanliu 记得还得去 sshd_config 文件里面看一下配置
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   943 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:10 · PVG 05:10 · LAX 14:10 · JFK 17:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.