Remote root login

The SARPi project forum. For anything and everything relating to Slackware ARM on a Raspberry Pi 1, 2, and 3. This forum is NOT a replacement or substitute for the Slackware (ARM) forums on Linux Questions website! Please try to seek help there first about any issues you may be experiencing, or question you might have, before posting on here.
User avatar
Jon54
New member
New member
Posts: 2
Joined: Tue Feb 10 2015 - 20:40:28

Remote root login

Postby Jon54 » Tue Feb 10 2015 - 20:58:24

I thought I'd give Slack a try - it's not nearly as scary as people make out!

I successfully got through the installation on a headless Pi over SSL from my Debian notebook, then on reboot could not login. Thinking I must have mistyped the password (twice) I renistalled - same thing. It then struck me that it was a "not allowed" error, not invalid password; remote root logins disabled after configuration.

A quick DDG revealed that /etc/ssh/sshd_config should have a PermitRootLogin setting, but the SlackArmPi filesystem doesn't seem to have this file, so where should I look?

I'm looking forward to a great learning adventure.

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Remote root login

Postby linicks » Tue Feb 10 2015 - 22:34:53

Look in:

/etc/ssh/sshd_config

You do not need to reinstall. Power down the Pi, and mount the SD card on a Linux box. Mount the SD card and edit the file to suit (as sudo et al). Put the card back in, turn on...

Looking at my sshd_config file I see I done this*:

Match address nnn.nnn.nnn.nnn./24
PasswordAuthentication yes

For your local network address/mask.

Nick
*The trouble with GNU/Linux is that once you set up something to work, it always works forever, so when you need to revisit, maybe years later you forget what you done to do it.

P.S. what is DDG?
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Remote root login

Postby linicks » Tue Feb 10 2015 - 22:49:32

"A quick DDG revealed that /etc/ssh/sshd_config should have a PermitRootLogin setting, but the SlackArmPi filesystem doesn't seem to have this file, so where should I look?"

Oh, I misread, sorry.

All my Pi's do - and all my other two Slack boxes?

I am confused.

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
Jon54
New member
New member
Posts: 2
Joined: Tue Feb 10 2015 - 20:40:28

Re: Remote root login

Postby Jon54 » Wed Feb 11 2015 - 22:17:52

linicks wrote:Look in:

/etc/ssh/sshd_config

You do not need to reinstall. Power down the Pi, and mount the SD card on a Linux box. Mount the SD card and edit the file to suit (as sudo et al). Put the card back in, turn on...

Looking at my sshd_config file I see I done this*:

Match address nnn.nnn.nnn.nnn./24
PasswordAuthentication yes

For your local network address/mask.

Nick
*The trouble with GNU/Linux is that once you set up something to work, it always works forever, so when you need to revisit, maybe years later you forget what you done to do it.

P.S. what is DDG?


first reply - that's exactly what I did. With the uSD card in my notebook , [card]/etc/ doesn't have a directory sshd at all - I had expected at least something - do I just create a directory and put sshd_config into it and build the config from scratch?

second - DuckDuckGo.

In hindsight, when I did the installation and before restarting, as I was still in root (without a password at that stage) I should probably have added a non-root user with sudo....

I know what you mean about forgetting what you did - I try to keep a notebook, but it ends up full of Stuff That Didn't Work, and then you get it going and at that point you've given up writing it down!

User avatar
linicks
Registered user
Registered user
Posts: 126
Joined: Mon Oct 27 2014 - 20:26:01
Location: Pompey, England

Re: Remote root login

Postby linicks » Wed Feb 11 2015 - 22:34:07

Jon54 wrote:
linicks wrote:Look in:

/etc/ssh/sshd_config

You do not need to reinstall. Power down the Pi, and mount the SD card on a Linux box. Mount the SD card and edit the file to suit (as sudo et al). Put the card back in, turn on...

Looking at my sshd_config file I see I done this*:

Match address nnn.nnn.nnn.nnn./24
PasswordAuthentication yes

For your local network address/mask.

Nick
*The trouble with GNU/Linux is that once you set up something to work, it always works forever, so when you need to revisit, maybe years later you forget what you done to do it.

P.S. what is DDG?


first reply - that's exactly what I did. With the uSD card in my notebook , [card]/etc/ doesn't have a directory sshd at all - I had expected at least something - do I just create a directory and put sshd_config into it and build the config from scratch?

second - DuckDuckGo.

In hindsight, when I did the installation and before restarting, as I was still in root (without a password at that stage) I should probably have added a non-root user with sudo....

I know what you mean about forgetting what you did - I try to keep a notebook, but it ends up full of Stuff That Didn't Work, and then you get it going and at that point you've given up writing it down!


OK, there is nothing that by using root to create the image or creating a user account with sudo that would stop /etc/ssh/~ being there.

Are you sure you installed openssl/ssh on initial install? That is why it isn't there, surely?

Nick
https://linicks.net/

Q. What is the difference between a duck and an elephant?
A. You can't get down off an elephant.

User avatar
eclipse
New member
New member
Posts: 1
Joined: Mon Feb 22 2016 - 14:02:35

Re: Remote root login

Postby eclipse » Mon Feb 22 2016 - 14:13:59

I just encountered the same problem following the installation guide: http://rpi.fatdog.eu/index.php?p=install

Since the guide mentions installation without monitor it seems logical that after the installation you still keep going without monitor and keyboard. It's probably a good idea to update the guide so that it advises to create additional user capable of sudo-ing or at least to enable root log on-s via ssh (sshd_config). Otherwise you're basically locked out. I didn't find a way to contact the team supporting this guide so hopefully they'll see it here :)

Return to “SARPi Project - Slackware ARM on a Raspberry Pi”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests