[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Raspberry Pi images SSH access



On 2020-04-29 13:35, fl4co wrote:

Hi all,
 
I'd like to install one of the images provided on raspi.debian.net.
 
However, at https://raspi.debian.net/defaults-and-settings/ I read that the root account doesn't have a password and limited to local access only by default.
 
Since I use this Pi headless and don't have a monitor or a USB keyboard available for the first boot, I'd like to know if it's possible to enable the SSH daemon by placing a file called ssh or ssh.txt on the /boot FAT32 partition of the SD card, just like in Raspbian (https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/debian/raspberrypi-sys-mods.sshswitch.service). 
 
Or, if sshd is already enabled, does adding a password to the root account in /boot/firmware/sysconf.txt, as explained at https://raspi.debian.net/defaults-and-settings/, enable SSH access?
 
Thank you.
 
fl4co

I have not used the rspi images, but my reading of those docs is that the root account has an *EMPTY* password. That means that if you can get to a login prompt, you can login as root by just entering the root username and hitting enter twice.

Separately, ssh has been configured to block root logins. This will have been done using the PermitRootLogin setting in /etc/ssh/sshd_config

So in order to run your Pi headless, you should edit the image to set a root password, and also edit /etc/ssh/sshd_config to enable root login. For increased security you can set PermitRootLogin to prohibit-password, and add your ssh public key to /root/.ssh/authorized_keys


-- 
David Pottage

Reply to: