LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 06-01-2022, 10:52 AM   #1
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
15.3 ssh-keygen creates invalid RSA


No matter what I do, I cannot seem to get ssh-keygen to create an RSA key accepted by Google Compute Console's ssh key .. page.

Slackware's ssh creates an RSA that works immediately without issue. However, even though the compute VM (also 15.3 with the same ssh version as local) accepts the key created in Slackware, the one created on the local OpenSuse 15.3 is not seen as valid.

Copying the key to Slackware and running ssh-keygen -l -f on the file also returns that it is not a valid public key. I've tried changing bit sizes (2048, 3072 etc) as well as adding (and not adding) the -m pem flag.

I also created an RSA on the compute OpenSuse machine and copied it to the local, and despite them all running the same version, the local machine claimed the key was invalid. So basically.. the local machine generates keys that aren't valid, and everything that is valid to (everything else) is seen as being invalid to the same local 15.3 install.

What am I missing..?


Note: solved. The keygen was adding new line characters at the end of random blocks. Doing a cat -e on the file will show you the weirdness. Remove them and try again if you experience this..

Last edited by phantom_cyph; 06-01-2022 at 11:13 AM.
 
Old 06-03-2022, 12:26 PM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,612

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by phantom_cyph View Post
Note: solved. The keygen was adding new line characters at the end of random blocks. Doing a cat -e on the file will show you the weirdness. Remove them and try again if you experience this..
It's better if you post solutions as a follow-up post, because:

1) it removes the thread from the list of "Zero Reply Threads".
2) it causes anyone who might have subscribed to get notified (which editing doesn't do).

 
  


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
[SOLVED] SSH-Keygen or Easy-RSA? banderas20 Linux - Software 4 08-12-2018 03:19 AM
RSA SecurID: RSA Web Agent, integration of RSA auth page Linux_Kidd General 1 08-28-2013 05:59 PM
[SOLVED] ssh-keygen always creates root user in comment Luminaro Linux - Newbie 3 10-24-2012 11:25 AM
ssh-keygen -t rsa -b 2048 without a passphrase sycamorex Linux - Security 7 06-10-2010 04:42 PM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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