Can someone please tell me when this will be resolved? I still can’t add Public SSH Keys from a cPanel server to CloudMin, to allow CloudMin to manage (i.e add / remove Network Interfaces, memory, view bandwidth usage, etc) a cPanel server which uses SSH Keys to CloudMin
This form may be wanting an ascii armored version, perhaps? I’m not sure. When copy/pasting, the client can do weird things with more complex data. Browsers may choose different encodings, etc.
It’s kinda bug-like that you’re getting a traceback, anyway. I’ll ask Jamie to have a look at this thread.
I ran into this problem as well using Cloudmin GPL (7.4.kvm) and removing those lines did not work for me.
I looked at the code (server-manager-lib-funcs.pl, check_ssh_key_data) and it looks like the issue is the regexp back match: $3 should be $4. I made the patch to my local copy and I can now add a private key properly via upload or pasting it in.
But there seems to be a larger issue here. It appears that the first key generated MUST either be generated by Cloudmin or be a private key. Once one gets over that hurdle, one can add public keys that get added to newly-created VMs (which was my original intent). Is that a bug in the code, UI, or an issue with my understanding?
I’m glad that my edit was helpful. After I posted, I played around with things a bit more and better understand the use case. There seems to be something else awry here. In my case, I merely wanted to add a public SSH key that would be installed for root of the new machine.
It seems that if no SSH keys are defined, the code defaults to insisting that the first key be a private/public key pair. What I did to work around this was generate a keypair using the first option, but I am not using that key pair for the VM creation. I have it generating random root passwords. After I created this first key, I can go ahead and add in a public key to be included in roots authorized_keys file.
Is this behavior a bug? Or is it just a case of the UI/help needing to make this more clear. I’m happy to volunteer a fix in either case; just let me know your preference.