View Issue Details

IDProjectCategoryView StatusLast Update
0000126CloudGeneralpublic2023-02-17 03:55
ReporterNeil Hanlon Assigned ToNeil Hanlon  
PrioritynormalSeverityblockReproducibilityhave not tried
Status closedResolutionunable to reproduce 
Summary0000126: injection of ssh key broken on azure image
Additional Information```
I created an Azure VM from Rocky a couple of times.
I told Azure to use my usual existing ssh key.

I am unable to log in with the ssh key.
I login with the serial console, with cat:

[eyeadmin@Rocky-8-2 ~]$ cat .ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCmzAqw9WsJwNqckmkVOsAq5uMA b8peb0XZsk+BfPNg+JXJtkMtpmgEC5yFek1KEVErr52W2YDUvLbtzmUxdBEZ8nC3
… several lines removed here …
Zy81zSCEzpmVuEbA8A+Waj8JuWaEGHX+H8dESXU= generated-by-azure

[eyeadmin@Rocky-8-2 ~]$ cat /etc/rocky-release
Rocky Linux release 8.6 (Green Obsidian)

As you can see, “something” has wrapped the public key over multiple lines. And added “generated-by-azure”

I edited the authorized_keys file, and removed all the white space so the key is in one line as required.
After that I was able to login with my ssh key.
This shows that Azure provided my correct public key when the VM was being created.
I think it looks like the startup processing scripts provided to Azure with the Rocky OS is wrapping the key, possibly at 80 characters.

I posted this in a an existing thread about Azure. I should have posted it separately, so I am doing that now.
TagsNo tags attached.


Rich Alloway

Rich Alloway

2022-08-16 18:01

reporter   ~0000345

Is the VM instance provisioned by WALinuxAgent or cloud-init?

Can you attach your /etc/waagent.conf , /etc/cloud/cloud.cfg and any /etc/cloud/cloud.cfg.d/* files?

Issue History

Date Modified Username Field Change
2022-06-22 21:27 Neil Hanlon New Issue
2022-06-22 21:27 Neil Hanlon Status new => assigned
2022-06-22 21:27 Neil Hanlon Assigned To => Neil Hanlon
2022-08-16 18:01 Rich Alloway Note Added: 0000345
2023-02-17 03:55 Neil Hanlon Status assigned => closed
2023-02-17 03:55 Neil Hanlon Resolution open => unable to reproduce