Amazon Lightsail 怎么拿到root登陆权限

Chengtx 2026-06-19 15:57 1

rt

最新回复 (14)
  • SimonXLAtticus 06-19 15:58
    1

    可以问问AI

  • ZH-LY 06-19 15:58
    2

    sudo -i

  • Chengtx 楼主 06-19 15:59
    3

    @SimonXLAtticus #1 sounds a good idea

  • Doris 06-19 15:59
    4

    2楼说的对

  • qiqi3363 06-19 15:59
    5

    用脚本设置root登录就行

  • Shikanoko 06-19 16:09
    6

    你要开启允许 root 登入的话得修改 /etc/ssh/sshd_config 配置文件,把 PermitRootLogin 改成 yes 就行。如果是 Lightsail 的话我记得还得改 /root/.ssh/authorized_keys 来着

    不过我不建议允许 root 登入 ^-^

  • Chengtx 楼主 06-19 16:17
    7

    @Shikanoko #6 if you do not give the permission, how can you install the panel you need?

  • Shikanoko 06-19 16:19
    8

    @Chengtx #7 you can install it in rootless mode, or just use "sudo" command if you really need rootful panel. ^-^

  • Chengtx 楼主 06-19 16:21
    9

    you can install it in rootless mode===while, is there any new codes for this as I am using :bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh) v2.9.4 and the sys require to have the root authorization.

  • Shikanoko 06-19 16:27
    10

    @Chengtx #9 just use "sudo su" to switch to root user so that you can install it. I’m just saying that I don't recommend you allowing root users to log in via SSH. ^-^

  • Chengtx 楼主 06-19 16:30
    11

    @Shikanoko #10 just did, but why not, cz basically all the vps seller are giving credentials with root and password

  • Shikanoko 06-19 16:39
    12

    @Chengtx #11 coz' if you allowing it, people who gets your SSH key can easly login & change everything (including system stuff) in your machine. If only allowing user, they needs to get both SSH Key and user password (otherwise they can only change user things).

    I think it'll be safer that not allowing root login. ^-^

  • Chengtx 楼主 06-19 16:41
    13

    people who has your SSH key ====except the vps seller,so seems it doesn't matter

  • scope5814 06-19 16:43
    14

    sudo -s 就行

* 帖子来源NodeSeek
返回