bargees / barge-os

Yet another lightweight Linux distribution for Docker containers
GNU General Public License v2.0
163 stars 15 forks source link

[Bug] Can't ssh root access and can't passwd root #109

Closed diyism closed 2 years ago

diyism commented 3 years ago
  1. Can't ssh root access: create /root/.ssh/authorized_keys and add my ssh-rsa pub key into it, and /etc/init.d/S50sshd restart, the client sitll can't ssh -vv root@my_vps_ip:
    debug1: Next authentication method: publickey
    debug1: Offering public key: /home/malcolm/.ssh/id_rsa RSA SHA256:....
    debug2: we sent a publickey packet, wait for reply
    debug1: Authentications that can continue: publickey,password

    while after cp -r /root/.ssh/ /home/bargee/.ssh, I can "ssh barge@my_vps_ip " successfully without inputing password, it's weird, after all, the authorized_keys is totally same between /root/.ssh/ and /home/bargee/.ssh.

2.Can't passwd root:

$ passwd root
Error in `passwd': munmap_chunk(): invalid pointer
ailispaw commented 3 years ago

Sorry for this late reply.

It is assumed, because the root account is locked on init.

https://github.com/bargees/barge-os/blob/12375b0c13182410adeba9a5c4c67f967e8db6f3/overlay/init#L55

Please use sudo after logging in as barge.