LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-03-2016, 05:52 PM   #46
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,542

Rep: Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543Reputation: 8543

Quote:
Originally Posted by dowelld View Post
I'm considering petitioning Pat as he's around to change the default 'root' name to Bob.
https://lh3.googleusercontent.com/-9...p9uuo1_500.gif

That'll stop the bad guys.
Since it's clear you don't know how sshd works, I'd like to point out that if you have a user "bob" with UID 0, then sshd will not allow you to log in using a password with the default of "PermitRootLogin prohibit-password". It looks at the UID, not the username.
 
Old 02-03-2016, 06:07 PM   #47
dowelld
Member
 
Registered: Jan 2005
Location: Somerset, UK
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by volkerdi View Post
Since it's clear you don't know how sshd works, I'd like to point out that if you have a user "bob" with UID 0, then sshd will not allow you to log in using a password with the default of "PermitRootLogin prohibit-password". It looks at the UID, not the username.
Yeah, I know that. I said it earlier. I was taking the mick.
 
Old 02-03-2016, 09:02 PM   #48
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
Non "root" root

Quote:
Here's a blast from the past. What's in a name... well not a lot really. root/toor/a/fred/brian/kevin/jesus they all mean the same if passwd has them as uid 0.
<snip>
Nothing has changed though it seems, people are still obsessed with the name 'root' and how to secure it.
Quote:
I'm considering petitioning Pat as he's around to change the default 'root' name to Bob.

That'll stop the bad guys.
(Note: Nothing to do with SSH)
A few years ago I tried to increase security on some HP-UX and SunOS systems by creating an innocuous user name with ID=0 and giving the user name root an ID number with nobody type of permissions.

It worked...kind of. I reverted back to using root after a couple of weeks because most of the system administration maintenance scripts and application installation/update scripts only checked for the user name not the user ID number. It became tedious having to rewrite all the new installation/update scripts arriving every week for all of the programs we were running. I gave into convention and decided to use my extra energy elsewhere.

I remember at the time thinking the installation/update script authors were lazy by not properly checking for "god" access.

Last edited by TracyTiger; 02-03-2016 at 09:04 PM. Reason: Typo
 
Old 02-04-2016, 04:08 PM   #49
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
This was one amusing thread to read... usually it's a bit of TL;DR for me, but I kept reading for some reason.

I'd like to chip in a few cents, just to keep this going :-)

I like it how Dave started with ranting and now is in a state to be reasoned with. I understand your frustration, been there a few times when some defaults changed or things started to work differently "all of a sudden"; happens to all of us I suppose. Keeps things interesting, I guess.

Anyway, your prior claim that changing this default from "permissive" to "restrictive" does not make Slackware _less_ suitable for server/corporate environments, but acutally more... security is a big issue, certainly nowadays. And as Pat stated, the rant would've been worse if this was reverse(d).

Also, I think that Slackware still (and always will be, because this philosophy is so much in the heart of it) does the "it's your system, do with it what you want"... It's only a default, but you can still (easily) change it.

I recall systems like Yast, where one had to do a change manually, because it was not in the menus... and then running that dreaded Yast again reversed that manual change... And there have been more... heck, it was the same system: I had to uninstall almost everything to replace one kind of LDAP with another LDAP... because, heck: everything was eventually glued to that LDAP... about as far as the kernel. Give me Slackware any day! There will be some surprises, but none (I hope) I cannot overcome. It's my system, I can do with it what I want.
 
Old 02-05-2016, 04:15 PM   #50
dowelld
Member
 
Registered: Jan 2005
Location: Somerset, UK
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 12
You know that realisation you get half way through the thread when it occurs to you that you're behaving like a dickead... well yes, I was angry, frustration at what seems a pointless change bought down the red-mist. It's pleasing to know someone obtained some amusement from it though.
 
4 members found this post helpful.
Old 02-06-2016, 06:28 AM   #51
riwi
Member
 
Registered: Jul 2011
Location: Netherlands
Distribution: Slackware64 14.2
Posts: 64

Rep: Reputation: Disabled
I just did a slackpkg upgrade-all and locked myself out of my box.
I did change the PermitRootLogin back to yes and also tried the new default "PermitRootLogin prohibit-password"
The authorizedkey for root is not accepted anymore and the password (obviously) is not accepted.

fail2ban now disabled the ssh port for my ip for an hour.

What strikes me as a nuisance is that everytime I do a slackpkg upgrade-all I must be prepared to spend at least a few hours on troubleshooting all the things I customized and that were undone by the upgrades.
 
Old 02-06-2016, 06:59 AM   #52
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,124

Rep: Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198
Quote:
Originally Posted by riwi View Post
I just did a slackpkg upgrade-all and locked myself out of my box.
I did change the PermitRootLogin back to yes and also tried the new default "PermitRootLogin prohibit-password"
The authorizedkey for root is not accepted anymore and the password (obviously) is not accepted.

fail2ban now disabled the ssh port for my ip for an hour.

What strikes me as a nuisance is that everytime I do a slackpkg upgrade-all I must be prepared to spend at least a few hours on troubleshooting all the things I customized and that were undone by the upgrades.
the problem is that you shouldn't do "slackpkg upgrade-all" blindly: it's assumed you have read the ChangeLog first.
Quote:
Originally Posted by the_changelog
*****************************************************************
* IMPORTANT: READ BELOW ABOUT POTENTIALLY INCOMPATIBLE CHANGES *
*****************************************************************
Rather than backport the fix for the information leak (which is the only
hazardous flaw), we have upgraded to the latest OpenSSH. As of version
7.0, OpenSSH has deprecated some older (and presumably less secure)
algorithms, and also (by default) only allows root login by public-key,
hostbased and GSSAPI authentication. Make sure that your keys and
authentication method will allow you to continue accessing your system
after the upgrade.

Last edited by ponce; 02-06-2016 at 07:02 AM.
 
Old 02-06-2016, 07:13 AM   #53
riwi
Member
 
Registered: Jul 2011
Location: Netherlands
Distribution: Slackware64 14.2
Posts: 64

Rep: Reputation: Disabled
That is a good tip

I have access now again. PermitRootLogin yes works OK.
Now I will have to redo my keys. They are now 1024bit DSA style. I am not a security wiz and have used these keys as is since 2007.
What type of public-key is best to choose?
 
Old 02-06-2016, 07:28 AM   #54
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,124

Rep: Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198
I use the defaults, that is what openssh developers consider safer: you can run
Code:
/etc/rc.d/rc.sshd restart
(that won't cut you off as only the listener process is killed) and that should take care of regenerating all the supported keys for the server (here ssh_host_dsa_key, ssh_host_ecdsa_key, ssh_host_ed25519_key and ssh_host_rsa_key).
then you delete/move away your old key for that server from your ~/.ssh/known_host on the client box and you try to connect again to the server: this should prompt you to accept by default an ecdsa-sha2-nistp256 key.
as you can see DSA keys are not considered so secure anymore and they have been superseded by ECDSA ones that are preferred when you have no local keys for that host.

Last edited by ponce; 02-06-2016 at 07:45 AM. Reason: fixed DSA/ECDSA informations
 
Old 02-06-2016, 08:21 AM   #55
riwi
Member
 
Registered: Jul 2011
Location: Netherlands
Distribution: Slackware64 14.2
Posts: 64

Rep: Reputation: Disabled
The puttyGen on the windows machine does not generate ecdsa keys. Can't get openssl-1.0.1r to accept the dsa keys.

I've tried to reinstall the 1.0.1.p package but is was removed from the mirrors and everywhere else I look. sigh. This exactly what I meant with nuissance.

I upgrade telco equipment. If I were to even suggest doing a change that could not be easily reverted I would be seriously frowned upon.
 
Old 02-06-2016, 08:38 AM   #56
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,124

Rep: Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198Reputation: 4198
maybe you got an old version of puttygen: it supports generating ECDSA keys since 2014

http://tartarus.org/~simon/putty-sna.../Chapter8.html

http://www.chiark.greenend.org.uk/~s...ist/ecdsa.html

Quote:
Originally Posted by riwi View Post
I upgrade telco equipment. If I were to even suggest doing a change that could not be easily reverted I would be seriously frowned upon.
...and so you blindly do "slackpkg upgrade-all"?

Last edited by ponce; 02-06-2016 at 09:00 AM.
 
Old 02-06-2016, 09:16 AM   #57
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by dowelld View Post
OK let me put the decision to accept this OpenSSH default into a little context.

At the end of every install off of a default slackware installation system into a VM, or onto any remote system, the installer (person doing the install) is going to have to remember to drop to the prompt and modify sshd_config before rebooting the system. Either that or he/she is going to have open a VM console session to modify the default install, or have someone take a screen or keyboard along to the headless system, to modify the default installed state.

So a default slackware install (from the unadulterated source Pat provides) to anything other than a PC which you can physically accesss is automatically harder. OpenSSH have decided slackware only belongs on PCs with screens and keyboards attached, and you all support that. No headless ARM boxes, no S390 images, no headless PCs. That's just fine.
It seems to me that you'd just modify your installer to copy your administration user's public key into /root/.ssh/authorized_keys or /root/.ssh/authorized_keys2
 
Old 02-06-2016, 09:22 AM   #58
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by dowelld View Post
Only 'the evil empire' brigade.

You and everyone else, and of course you're right.


I'm considering petitioning Pat as he's around to change the default 'root' name to Bob.
https://lh3.googleusercontent.com/-9...p9uuo1_500.gif

That'll stop the bad guys.
I think I've found my new background image for the work computer.
 
Old 02-06-2016, 09:25 AM   #59
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by dowelld View Post
You know that realisation you get half way through the thread when it occurs to you that you're behaving like a dickead... well yes, I was angry, frustration at what seems a pointless change bought down the red-mist. It's pleasing to know someone obtained some amusement from it though.
Some of us pick our aliases here with care, you know.
 
Old 02-06-2016, 09:32 AM   #60
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by ponce View Post
maybe you got an old version of puttygen: it supports generating ECDSA keys since 2014

http://tartarus.org/~simon/putty-sna.../Chapter8.html

http://www.chiark.greenend.org.uk/~s...ist/ecdsa.html


...and so you blindly do "slackpkg upgrade-all"?
Folks who work on telco software (I used to) would put a LOT of effort into making the installers/upgraders stupid-simple and able to back out of messed up installations on their own.

We had cases of equipment sitting in a bunker out in the middle of nowhere (like an island in the Pacific) that had to be upgraded remotely over a satellite link. You really didn't want to be the one to fly out to fix the problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh to non-22 not working, edited sshd_config and restarted sshd NirvanaBaby Linux - Server 13 08-18-2011 09:48 AM
Starting sshd: /etc/ssh/sshd_config line 60: garbage at end of line; "no". any clue? loba09 Linux - Server 1 02-17-2011 07:04 PM
crux4slack package updated Falcony Slackware 6 11-04-2009 11:37 AM
Starting sshd: /etc/init.d/sshd: line 113: /usr/sbin/sshd: Permission denied sumanc Linux - Server 5 03-28-2008 04:59 AM
sshd package? fenderman11111 Debian 2 10-17-2004 01:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration