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

Re: Raspberry Pi images SSH access



fl4co dijo [Wed, Apr 29, 2020 at 02:43:47PM +0200]:
> Hi all,

¡Hola Flaco!

> I’d like to install one of the images provided on raspi.debian.net
> <http://raspi.debian.net/>.

I'm very happy - I'm the person building them :-]

> However, at https://raspi.debian.net/defaults-and-settings/
> <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
> <https://github.com/RPi-Distro/raspberrypi-sys-mods/blob/master/debian/raspberrypi-sys-mods.sshswitch.service>).

Read on, on that same page (defaults-and-settings). You can write to
the first partition (call it /dev/mmcblk0p1, /dev/sdb1, or wherever it
appears in your system), in the file "sysconf.txt":

    root_pw: Set a password for the root user (by default, it allows
    	     for a passwordless login)

Now... I cannot *assure* this will work right away for allowing a
remote login. I don't have a live RPi at the moment. But others have
pointed out at the PermitRootLogin setting in /etc/ssh/sshd_config. In
earlier versions, the build _did_ modify that file to set
PermitRootLogin=yes; I am no longer deviating from the Debian
standard. If I'm not mistaken, the default Debian configuration is an
implicit:

    PermitRootLogin prohibit-password

If so, you should also edit /etc/ssh/sshd_config in your second
partition and set:

    PermitRootLogin yes


Reply to: