[Solved] SSH install on raspbian lite : user pi should be logged out

Hi,

I Installed raspbian lite then followed tutorial from https://yunohost.org/#/install_on_raspberry_fr to install Yunohost
I’m stuck at the stage “sudo ./install_yunohost”

I get this error
root@raspberrypi:/tmp/install_script# ./install_yunohost
Failure !
The following error was caught during YunoHost installation :

The user pi should be logged out

The problem is that only the user “pi” is available for connection through SSH so he is always connected AFAIK.

Yes, that’s not so trivial to solve.

You need to tweak /etc/ssh/sshd_config to allow root to connect through ssh (PermitRooLogin yes, maybe add it in the AllowUsers also). Then connect back as root.

Edit : don’t forget to reload the ssh daemon after that (service sshd reload)

I created another user to go around this issue.
This info should be on the tutorial documentation webpage I think

Hi @Tuxicoman,

There is some tricks here http://avignu.wiki.tuxfamily.org/doku.php?id=documentation:yunohost-jessie-v2.5.x-rpi3b

I hope they could help you :slight_smile:

@CaptainSqrt2 don’t hesitate to grab things that could help for documentation in this tutorial … I’ve wrote them :wink:

ppr

1 Like

Is that a new behaviour in 2.5 ?
When I installed my 2.4, root connection was allowed by default (and I remember that some people advised me to change this behaviour)

Hi @Lapineige,

It’s not about YunoHost v2.5 but about the raspbian’s builds since november 2016 for security (3. ENABLE SSH) :
https://www.raspberrypi.org/documentation/remote-access/ssh/
In order to activate SSH by default have a look here (installation manuelle) : https://yunohost.org/#/install_on_raspberry_fr

ppr

Thanks for your anwser :slight_smile:

That’s a good thing for security, but as @Tuxicoman said the way to change it should be indicated in the doc.
Because it’s important to know the default behaviour (some people might want to finish the install via SSH and will be blocked) and how to change it.
Thanks ! :slight_smile:

Yes, we should definitely add it in the doc (feel free to open a pull request for that).

I just want to add that the recommended way to install is using the Yunohost image, given that starting from Raspian is tricky (because ssh is not enabled by default, and so on). We might want to add a “recommended” next to the title to clarify that as well.