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-11-2022, 08:27 PM   #1
Mig21
Member
 
Registered: Jan 2005
Posts: 263

Rep: Reputation: 45
Putty won't use ssh key on Slackware 15


Hello

I upgraded one of my servers to Slackware 15, from 14.2

I have one problem I can't figure out. I can ssh from a terminal on my Linux Mint workstation to the server, and I don't need a password. The ~/.ssh/id_rsa on the client and ~/.ssh/authorized_keys on the server work fine.

I could do the same from this workstation to the same server before I upgraded Slackware. But now I can't. It asks me for the password.

I am tempted to guess this must be some putty configuration, except it worked before I upgraded the server, and it still works for other servers. So something must have changed about the defaults of the ssh server in Slackware 15.

Anyone have a clue what it might be? I diffed the old sshd_config and the new one, can't see any relevant difference there.

Thanks in advance.
 
Old 02-11-2022, 08:44 PM   #2
HaroldSch
LQ Newbie
 
Registered: Feb 2022
Posts: 10

Rep: Reputation: 1
RSA is no longer supported. You'll need to upgrade. See below.

Originally Posted by Pat on The ChangeLog
Sun Sep 26 18:57:07 UTC 2021
[...]
n/openssh-8.8p1-x86_64-1.txz: Upgraded.
Please note "Potentially-incompatible changes" from the release notes:
This release disables RSA signatures using the SHA-1 hash algorithm
by default. This change has been made as the SHA-1 hash algorithm is
cryptographically broken, and it is possible to create chosen-prefix
hash collisions for <USD$50K [1]
For most users, this change should be invisible and there is
no need to replace ssh-rsa keys. OpenSSH has supported RFC8332
RSA/SHA-256/512 signatures since release 7.2 and existing ssh-rsa keys
will automatically use the stronger algorithm where possible.
Incompatibility is more likely when connecting to older SSH
implementations that have not been upgraded or have not closely tracked
improvements in the SSH protocol. For these cases, it may be necessary
to selectively re-enable RSA/SHA1 to allow connection and/or user
authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms
options. For example, the following stanza in ~/.ssh/config will enable
RSA/SHA1 for host and user authentication for a single destination host:
Code:
Host old-host
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
We recommend enabling RSA/SHA1 only as a stopgap measure until legacy
implementations can be upgraded or reconfigured with another key type
(such as ECDSA or Ed25519).
[1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and
Application to the PGP Web of Trust" Leurent, G and Peyrin, T
(2020) https://eprint.iacr.org/2020/014.pdf

Last edited by HaroldSch; 02-11-2022 at 08:45 PM.
 
1 members found this post helpful.
Old 02-11-2022, 08:54 PM   #3
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,479

Rep: Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231Reputation: 4231
Quote:
Originally Posted by HaroldSch View Post
RSA is no longer supported. You'll need to upgrade. See below.
Originally Posted by Pat on The ChangeLog
Sun Sep 26 18:57:07 UTC 2021
[...]
n/openssh-8.8p1-x86_64-1.txz: Upgraded.
Please note "Potentially-incompatible changes" from the release notes:
This release disables RSA signatures using the SHA-1 hash algorithm
by default. This change has been made as the SHA-1 hash algorithm is
cryptographically broken, and it is possible to create chosen-prefix
hash collisions for <USD$50K [1]
For most users, this change should be invisible and there is
no need to replace ssh-rsa keys. OpenSSH has supported RFC8332
RSA/SHA-256/512 signatures since release 7.2 and existing ssh-rsa keys
will automatically use the stronger algorithm where possible.
Incompatibility is more likely when connecting to older SSH
implementations that have not been upgraded or have not closely tracked
improvements in the SSH protocol. For these cases, it may be necessary
to selectively re-enable RSA/SHA1 to allow connection and/or user
authentication via the HostkeyAlgorithms and PubkeyAcceptedAlgorithms
options. For example, the following stanza in ~/.ssh/config will enable
RSA/SHA1 for host and user authentication for a single destination host:
Code:
Host old-host
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
We recommend enabling RSA/SHA1 only as a stopgap measure until legacy
implementations can be upgraded or reconfigured with another key type
(such as ECDSA or Ed25519).
[1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and
Application to the PGP Web of Trust" Leurent, G and Peyrin, T
(2020) https://eprint.iacr.org/2020/014.pdf
not quite

RSA with SHA1 algorithm is no longer supported
Code:
OpenSSH has supported RFC8332
RSA/SHA-256/512 signatures since release 7.2 and existing ssh-rsa keys
will automatically use the stronger algorithm where possible.
 
1 members found this post helpful.
Old 02-11-2022, 11:21 PM   #4
Mig21
Member
 
Registered: Jan 2005
Posts: 263

Original Poster
Rep: Reputation: 45
SHA-1 isn't my problem:

Code:
$ ssh-keygen -l -f id_rsa
2048 SHA256:---edited--- andrew@g60 (RSA)
 
Old 02-11-2022, 11:46 PM   #5
HaroldSch
LQ Newbie
 
Registered: Feb 2022
Posts: 10

Rep: Reputation: 1
I had the exact same problem. I changed my key to another type (ECDSA or Ed25519)

Last edited by HaroldSch; 02-11-2022 at 11:50 PM.
 
Old 02-12-2022, 12:00 AM   #6
Mig21
Member
 
Registered: Jan 2005
Posts: 263

Original Poster
Rep: Reputation: 45
Your user's ssh key or the server key?
 
Old 02-12-2022, 04:07 AM   #7
HaroldSch
LQ Newbie
 
Registered: Feb 2022
Posts: 10

Rep: Reputation: 1
Both.
 
Old 02-12-2022, 04:11 AM   #8
Mig21
Member
 
Registered: Jan 2005
Posts: 263

Original Poster
Rep: Reputation: 45
But why is it only an issue with Putty?
 
Old 02-12-2022, 04:48 AM   #9
HaroldSch
LQ Newbie
 
Registered: Feb 2022
Posts: 10

Rep: Reputation: 1
Is it possible that when you tried to log into the undated server with Putty for the fist time you didn't update the host key cached in Putty?

Last edited by HaroldSch; 02-12-2022 at 04:58 AM.
 
Old 02-12-2022, 05:18 AM   #10
Mig21
Member
 
Registered: Jan 2005
Posts: 263

Original Poster
Rep: Reputation: 45
How would I check that? Putty is great, except for the settings. I can never find anything in there
 
Old 02-12-2022, 05:40 AM   #11
HaroldSch
LQ Newbie
 
Registered: Feb 2022
Posts: 10

Rep: Reputation: 1
Sorry no I don't.

It would appear that I misunderstood your original issue as well. The problem I had was putty would log into an updated server but WinSCP would not when I was using the same key.
 
Old 02-16-2022, 11:15 PM   #12
Mig21
Member
 
Registered: Jan 2005
Posts: 263

Original Poster
Rep: Reputation: 45
I upgraded my second Slackware server to 15 and have exactly the same problem.

The key autentication works with a terminal, works with svn checkout, but won't work with putty.
 
  


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
How do I convert a putty private key to be used as a private key on a RedHat or Ubuntu Server greavette Linux - General 2 06-26-2019 08:40 PM
LXer: What is SSH Key? How To Generate SSH Key in Linux? LXer Syndicated Linux News 0 04-30-2017 07:42 AM
SSH skips public key authentication for a key, but works with another key simopal6 Linux - General 1 07-06-2011 08:33 AM
Putty/SSH login failed when using RSA public key: 'Server refused our key' itsecx@gmail.com Linux - Server 10 10-04-2010 01:19 PM
LXer: Key-Based SSH Logins With PuTTY LXer Syndicated Linux News 1 12-10-2006 11:21 AM

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

All times are GMT -5. The time now is 06:51 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