LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-22-2024, 06:05 PM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
SSH/SFTP connection failures between Debian bookworm and Tumbleweed systems


I cannot seem to get ssh connections from a new bookworm install to a TW server on our LAN. TBH, I've had problems connecting to the TW system for some time starting with an older Leap 15.3 desktop. I was able to ssh into the TW system from a laptop that's still running 15.3. However the TW system was patched today and, for now, I'm unable to confirm whether the laptop is still able to connect. If I exchange keys between the bookworm and the TW systems, I'm still getting prompted for passwords in either connection direction. (These are for regular user accounts, not root)

I noticed that when I generated new ssh keys on the TW system, it wanted to save them in "id_ed25519" and "id_ed25519.pub" instead of the normal files. I'm not sure what to make of that change and don't know if it's telling me something significant but the old ".pub" file is 397 bytes while the new one is only 97 (which seems low). Is this a new location for SSH keys?

Any help on this would be helpful as it's broken some cron jobs (that can't now authenticate to the SMTP service on the TW system) that need to send emails and Ansible. Everything I've run across online seems to want firewall settings to be opened up which would make sense if either system was running a firewall. Client connections to the TW system's IMAP service are not affected (using plaintext passwords for now) so I can receive email,just not send it through the same system.

TIA for any hints, pointers to HOWTOs, etc. someone can offer up
 
Old 03-22-2024, 06:52 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,736

Rep: Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921
I assume by normal you mean rsa. ed25519 is considered better because it provides the same level of security with smaller keys. Normally the default key names are automatically tried but if you are using something else you might have to specify the key name using the -i option or setup a config file. Have you checked the debug messages by adding -vvv options when trying to login?
 
Old 03-23-2024, 04:38 AM   #3
lvm_
Member
 
Registered: Jul 2020
Posts: 942

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Set higher loglevel in sshd_config on the server if necessary and check logs.
 
Old 03-23-2024, 04:51 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Quote:
Originally Posted by lvm_ View Post
Set higher loglevel in sshd_config on the server if necessary and check logs.
The quick way to do that is to fire up a separate instance of sshd on another port and save the session information to its own log file:

Code:
sudo /usr/sbin/sshd -p 2222 -d -E /tmp/sshd.log
That will allow a single session on port 2222 and save the whole log from start to finish in the file /tmp/sshd.log and no other sessions. That will weed out the noise, especially if it is a busy server.

The -d option can be added one to three times to allow for a variable amount of debugging material.
 
Old 03-23-2024, 10:52 AM   #5
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by michaelk View Post
I assume by normal you mean rsa. ed25519 is considered better because it provides the same level of security with smaller keys. Normally the default key names are automatically tried but if you are using something else you might have to specify the key name using the -i option or setup a config file. Have you checked the debug messages by adding -vvv options when trying to login?
So the "ed25519" files re considered the new norm, then? (I missed that announcement.)

I tried wading through the messages the debug switches enabled. Still trying to make heads/tails out of what was displayed.

Thanks for the feedback.
 
Old 03-23-2024, 11:05 AM   #6
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Quote:
Originally Posted by rnturn View Post
So the "ed25519" files re considered the new norm, then? (I missed that announcement.)
That happened in OpenSSH 9.5 back in October:

Quote:
* ssh-keygen(1): generate Ed25519 keys by default. Ed25519 public keys
are very convenient due to their small size. Ed25519 keys are
specified in RFC 8709 and OpenSSH has supported them since version 6.5
(January 2014).
And in 8.5 for the server host keys.
 
Old 03-23-2024, 03:06 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Turbocapitalist View Post
That happened in OpenSSH 9.5 back in October:

And in 8.5 for the server host keys.
Thanks. Looks like I fell behind in my leisure reading.
 
Old 03-23-2024, 03:12 PM   #8
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by rnturn View Post
I cannot seem to get ssh connections from a new bookworm install to a TW server on our LAN.

[snip]

TIA for any hints, pointers to HOWTOs, etc. someone can offer up
I hate to quote myself...

I figured this out. I'll dig a little deeper to get a better understanding as to why this worked. I generated a new key using the "-t ed25519" switch on the Bookworm system and imported it into the TW system's authorized_keys file. Success!

Now I'll look for a means of making ed25519 a new default or build some muscle memory when working with SSH from hereon. Gonna marked this as solved.

Thanks all...
 
  


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
3 systems. Debian 12 bookworm and apper?polkit? mrapathy Debian 1 10-08-2023 12:58 AM
[SOLVED] Update on Debian-Bookworm and Why Did Bookworm Remove Some Packages? kevinbenko Linux - Newbie 4 07-09-2022 09:00 AM
LXer: Debian 11 "Bullseye" and Debian 12 "Bookworm" Are Coming After Debian 10 "Buster" LXer Syndicated Linux News 0 04-18-2018 12:26 PM
[SOLVED] Joomla Drupal Update failures and Install from URL failures JimJS Linux - Desktop 4 05-26-2014 04:40 PM
LXer: Restricting Users To SFTP Plus Setting Up Chrooted SSH/SFTP (Debian Squeeze) LXer Syndicated Linux News 0 09-06-2011 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:16 AM.

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