Aram29
Posts: 5
Joined: Wed Jan 13, 2021 5:37 pm

SSH boots into root user

Wed Jan 13, 2021 5:50 pm

Hi,

I tried everything, can't figure it out.

After a fresh install on my raspberry pi 4 I can't boot into user PI over ssh.

When ssh is activated it always boots into root user (not with a ssh file in root folder and also not true ifconfig/raspi-config).

When I login without ssh than it will normally login into the Pi user environment.

Other sd also doesn't work ...

Someone any idea how to fix login into pi user over ssh?

Aram29
Posts: 5
Joined: Wed Jan 13, 2021 5:37 pm

Re: SSH boots into root user

Fri Jan 22, 2021 7:09 pm

I figured it out..

sudo nano /etc/ssh/sshd_config
Find this line: PermitRootLogin without-password
Edit: PermitRootLogin yes
Close and save file
reboot or restart sshd service using: /etc/init.d/ssh restart
Set a root password if there isn't one already: sudo passwd root

User avatar
B.Goode
Posts: 11608
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: SSH boots into root user

Fri Jan 22, 2021 7:31 pm

Aram29 wrote:
Wed Jan 13, 2021 5:50 pm
Hi,

I tried everything, can't figure it out.

After a fresh install on my raspberry pi 4 I can't boot into user PI over ssh.

When ssh is activated it always boots into root user (not with a ssh file in root folder and also not true ifconfig/raspi-config).

When I login without ssh than it will normally login into the Pi user environment.

Other sd also doesn't work ...

Someone any idea how to fix login into pi user over ssh?



"After a fresh install on my raspberry pi 4"


A fresh install of what?

Return to “Troubleshooting”