0

When I load a new machine (PI), I allow root login, then login and rsync to root@xxxx:/*.sh . to bring in my auto update and daily status scripts. Just loaded this RaspberryPi 4 with 64 bit and it appears that root is neither allowed to ssh out to another box nor rsync. Is there a way around this? Note I have edited the sshd.config to allow root login. That works fine. Ater a day of logging in and out it now works??!

1
  • the title of your post does not describe the question ... please change it
    – jsotola
    Aug 23, 2023 at 18:57

3 Answers 3

1

Whether or not SSH allows root in is a matter of one line in /etc/ssh/sshd_config:

PermitRootLogin [yes|no|prohibit-password|forced-commands-only]

The default when there is no explicit setting is prohibit-password (and I think on RpiOS that is explicitly set), meaning you could use a key, which also means you don't need a normal login password either (not positive, but pretty sure).

This is all documented in man sshd_config. However, your issue with ssh'ing out:

it appears that root is neither allowed to ssh out to another box nor rsync

Requires an explanation of what you mean by "it appears that". Is there some error?

0

Raspberry Pi OS (like all Debian based OS) does not have root login (although it is possible to enable it) as it unnecessary for normal use.

ssh does not (by default) allow root access (again no need) and is a security risk.

You are unlikely to find anyone who does this.

I suggest you ask about what you are actually trying to do for suggestions on the normal process.

0

Don't know why but today it works like all my 32 bit pi's. Don't know why.

Note: I did say what I was trying to do. Root has backup scripts etc for crontab to run and rather that recreate them, I enable root login (This is my 10 Pi network of UPS monitors and fileserver) and I rsync to the main pi to retrieve for the new one. When I started this, a rsync or ssh would just hang. Much later it started working. And yes I rebooted several times. Never had this happen when adding a 32 bit pi. I marked it solved because it is working now, and the 64 bit unit is installed in the network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.