Bug 1119928 - Import of public ssh key failed/not written to .ssh/authorized_keys
Import of public ssh key failed/not written to .ssh/authorized_keys
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: YaST Team
Jiri Srain
https://trello.com/c/F79jyAxh/2731-sl...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-19 09:20 UTC by Thorsten Kukuk
Modified: 2021-09-01 12:58 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
y2log-1.tar.gz (240.68 KB, application/gzip)
2018-12-19 09:20 UTC, Thorsten Kukuk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Kukuk 2018-12-19 09:20:25 UTC
Created attachment 793017 [details]
y2log-1.tar.gz

During installation of openSUSE MicroOS, I imported the authorized_keys file into YaST2 (didn't know which key from it I exactly needed, so I imported that file and not a *.pub file).

I got no error from YaST, but afterwards, /root/.ssh/authorized_keys was empty and there was an error in the log files about the key import. But no error was shown to the user.
Comment 1 Stefan Schubert 2018-12-19 12:48:15 UTC
Do you have imported it via linuxrc settings or during the YaST workflow ?
Comment 2 Thorsten Kukuk 2018-12-19 12:53:25 UTC
(In reply to Stefan Schubert from comment #1)
> Do you have imported it via linuxrc settings or during the YaST workflow ?

Via YaST workflow.
Comment 3 Stefan Schubert 2018-12-21 12:11:56 UTC
Yes, the return value will not be processed:
https://github.com/yast/yast-users/blob/master/src/lib/users/ssh_authorized_keys_file.rb#L95

Only the warning will be logged as Thorsten has already mentioned:

users/ssh_authorized_keys_file.rb:76 The key 'ssh-dss.......'  does not look like a valid SSH key

Tracked in Trello.