V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
Dedicatus545
V2EX  ›  云计算

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

  •  
  •   Dedicatus545 · Jun 3, 2020 · 4072 views
    This topic created in 2167 days ago, the information mentioned may be changed or developed.
    我记得以前网页 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 replies    2020-06-03 14:09:53 +08:00
    Dedicatus545
        1
    Dedicatus545  
    OP
       Jun 3, 2020
    为什么没大佬鸟我
    loukky
        2
    loukky  
       Jun 3, 2020 via Android
    可以。不过我是手动改的
    leishi1313
        3
    leishi1313  
       Jun 3, 2020
    可以应该是可以,但是为什么要这样呢。直接用 ssh key 方便又安全
    stille
        5
    stille  
       Jun 3, 2020
    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  
       Jun 3, 2020
    可以
    brendanliu
        7
    brendanliu  
       Jun 3, 2020
    可以 在控制台添加 ssh 秘钥的时候 拥有者是 [email protected] 就可以
    brendanliu
        8
    brendanliu  
       Jun 3, 2020
    @brendanliu 记得还得去 sshd_config 文件里面看一下配置
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1025 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 18:30 · PVG 02:30 · LAX 11:30 · JFK 14:30
    ♥ Do have faith in what you're doing.