Your most recent post (as well as a few of your other posts in the recent past) reflect an attitude that you tell us how Cloudmin / Virtualmin / Webmin falls short of your expectations, however unfounded these may be about how Cloudmin is supposed to work, and it becomes the job of the community to convince you otherwise. That is not how this works.
Please follow the community guidelines and provide relevant snippets from logs - and even screenshots, if they help illustrate the issue better - to enable the community to help you install and use this free, open-source software which has a long and proven history of success and an existing global user base which has been able to use it in production environments via the documentation that is available online.
the error is sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
i understand i cant use ssh username and password.
therefore i created ssh key which i have installed on the second server.
no matter what i do i cannot add this newly created key to cloudmin ssh key, i tried pasting, selecting file /id_rsa i keep getting this error Failed to save SSH key : Existing key file does not contain an SSH key.
That’s the private key. I still don’t understand what you’re doing or where you’re doing it, exactly, but the way ssh keys work is like this:
Create a public/private key pair on the system you want to be able to connect from.
Copy the public key to the system you want to be able to connect to in the /root/.ssh/authorized_keys file (or whatever user you’re trying to connect as). The private key generally never leaves the system it is generated on.
So, when I see you saying you’re copying id_rsa, I assume that’s what you’re doing wrong, because that’s not a file you copy (unless it’s your personal key and you want to take it with you to a new computer).
Make sure that if you’re using putty to generate keys, you export to the openssh compatible format (I have no idea what the native putty format is for, since it doesn’t work on any system I’ve ever managed).
Im sorry if i am not very clear, i did mention at the start of post i am trying to create KVM instance in cloudmin, if you look at the short paragraph in cloudmin documentation i was simply trying to follow the steps below
Go to Cloudmin Settings → SSH Keys, and click on Add a new SSH key.
Fill in the Key description field, and enter the path to the private key file into the In existing file box, such as /root/.ssh/id_rsa
Change the Add to root’s authorized keys field to Yes.
Click the Create button.
Alternately, you can have Cloudmin generate a new key or use one that you paste in on that same form.
When i generate via cloudmin, the key doesnt work and there isnt enough information where this key is stored and what to do next, how do i make that Cloudmin generated key work?
This is the error i am getting at the moment
Checking SSH login … … SSH connection failed : Login failed ( The authenticity of host ‘192.168.50.10 (192.168.50.10)’ can’t be established. ECDSA key fingerprint is SHA256:2mYd21PcZXgZGXz+NG56OCnNkLLxy9JPm5uRJ8lwDLEc. /[fingerprint])? Warning: Permanently added ‘192.168.50.10’ (ECDSA) to the list of known hosts. Permission denied, please try again. )
Hi Joe, i did all that, and the key works i can ssh via terminal no issues to the other server
but problem is in cloudmin (ssh keys–add ssh key) when i try and add that key for authentication, it keeps giving error-- Failed to save SSH key : Existing key file does not contain an SSH key.
which key should i choose in the cloudmin ?
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?