You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Nux! <nu...@li.nux.ro> on 2015/04/01 15:15:38 UTC

reset sshkeyforvirtualmachine also resets password

Hi,

I've just noticed resetsshkeyforvirtualmachine also resets the root password. 
This doesn't sound right. Is this supposed to happen?

4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM 

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

Re: reset sshkeyforvirtualmachine also resets password

Posted by Harikrishna Patnala <ha...@citrix.com>.
When we create or register ssh key with CS API, CS only stores public key.
So, cloudstack does not know the private key to decrypt the password and encrypt it with new ssh key.

Thanks,
Harikrishna
On 02-Apr-2015, at 11:59 am, Erik Weber <te...@gmail.com> wrote:

> Could it not simply be reencoded with the new key?
> 
> Erik
> 
> Den torsdag 2. april 2015 skrev Harikrishna Patnala <
> harikrishna.patnala@citrix.com> følgende:
> 
>> Hi Nux,
>> 
>> As already mentioned we store the encrypted vm password using the ssh key,
>> so we need to reset the password also.
>> 
>> Regarding the password field in the DB, we have an API to get the VM
>> password (
>> https://cloudstack.apache.org/docs/api/apidocs-4.5/root_admin/getVMPassword.html)
>> which gets encrypted password from DB.
>> 
>> Thanks,
>> Harikrishna
>> 
>> On 02-Apr-2015, at 5:07 am, Nux! <nux@li.nux.ro <javascript:;>> wrote:
>> 
>>> Somesh,
>>> 
>>> Why wouldn't the root password field in the DB just be left alone?
>>> 
>>> --
>>> Sent from the Delta quadrant using Borg technology!
>>> 
>>> Nux!
>>> www.nux.ro
>>> 
>>> ----- Original Message -----
>>>> From: "Somesh Naidu" <Somesh.Naidu@citrix.com <javascript:;>>
>>>> To: dev@cloudstack.apache.org <javascript:;>
>>>> Sent: Thursday, 2 April, 2015 00:06:54
>>>> Subject: RE: reset sshkeyforvirtualmachine also resets password
>>> 
>>>> I believe so, since the VM's password (stored in the user_vm_details
>> table)
>>>> needs to be encrypted using the new keys and I believe encryption is a
>> one-way
>>>> hash.
>>>> 
>>>> Somesh
>>>> CloudPlatform Escalations
>>>> Citrix Systems, Inc.
>>>> 
>>>> 
>>>> -----Original Message-----
>>>> From: Nux! [mailto:nux@li.nux.ro <javascript:;>]
>>>> Sent: Wednesday, April 01, 2015 9:16 AM
>>>> To: dev
>>>> Subject: reset sshkeyforvirtualmachine also resets password
>>>> 
>>>> Hi,
>>>> 
>>>> I've just noticed resetsshkeyforvirtualmachine also resets the root
>> password.
>>>> This doesn't sound right. Is this supposed to happen?
>>>> 
>>>> 4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM
>>>> 
>>>> --
>>>> Sent from the Delta quadrant using Borg technology!
>>>> 
>>>> Nux!
>>>> www.nux.ro
>> 
>> 


Re: reset sshkeyforvirtualmachine also resets password

Posted by Erik Weber <te...@gmail.com>.
Could it not simply be reencoded with the new key?

Erik

Den torsdag 2. april 2015 skrev Harikrishna Patnala <
harikrishna.patnala@citrix.com> følgende:

> Hi Nux,
>
> As already mentioned we store the encrypted vm password using the ssh key,
> so we need to reset the password also.
>
> Regarding the password field in the DB, we have an API to get the VM
> password (
> https://cloudstack.apache.org/docs/api/apidocs-4.5/root_admin/getVMPassword.html)
> which gets encrypted password from DB.
>
> Thanks,
> Harikrishna
>
> On 02-Apr-2015, at 5:07 am, Nux! <nux@li.nux.ro <javascript:;>> wrote:
>
> > Somesh,
> >
> > Why wouldn't the root password field in the DB just be left alone?
> >
> > --
> > Sent from the Delta quadrant using Borg technology!
> >
> > Nux!
> > www.nux.ro
> >
> > ----- Original Message -----
> >> From: "Somesh Naidu" <Somesh.Naidu@citrix.com <javascript:;>>
> >> To: dev@cloudstack.apache.org <javascript:;>
> >> Sent: Thursday, 2 April, 2015 00:06:54
> >> Subject: RE: reset sshkeyforvirtualmachine also resets password
> >
> >> I believe so, since the VM's password (stored in the user_vm_details
> table)
> >> needs to be encrypted using the new keys and I believe encryption is a
> one-way
> >> hash.
> >>
> >> Somesh
> >> CloudPlatform Escalations
> >> Citrix Systems, Inc.
> >>
> >>
> >> -----Original Message-----
> >> From: Nux! [mailto:nux@li.nux.ro <javascript:;>]
> >> Sent: Wednesday, April 01, 2015 9:16 AM
> >> To: dev
> >> Subject: reset sshkeyforvirtualmachine also resets password
> >>
> >> Hi,
> >>
> >> I've just noticed resetsshkeyforvirtualmachine also resets the root
> password.
> >> This doesn't sound right. Is this supposed to happen?
> >>
> >> 4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM
> >>
> >> --
> >> Sent from the Delta quadrant using Borg technology!
> >>
> >> Nux!
> >> www.nux.ro
>
>

Re: reset sshkeyforvirtualmachine also resets password

Posted by Harikrishna Patnala <ha...@citrix.com>.
Password is encrypted and stored only if the vm is deployed from password enabled template and ssh public key is provided, 
Otherwise we don’t encrypt or store the password.


-Harikrishna


On 02-Apr-2015, at 1:48 pm, Nux! <nu...@li.nux.ro> wrote:

> Thanks Harikrishna, I did not know the password would get encrypted with the ssh key.
> What happens when there is no ssh key registered, how are the passwords encrypted then?
> 
> Lucian
> 
> --
> Sent from the Delta quadrant using Borg technology!
> 
> Nux!
> www.nux.ro
> 
> ----- Original Message -----
>> From: "Harikrishna Patnala" <ha...@citrix.com>
>> To: "<de...@cloudstack.apache.org>" <de...@cloudstack.apache.org>
>> Sent: Thursday, 2 April, 2015 07:17:54
>> Subject: Re: reset sshkeyforvirtualmachine also resets password
> 
>> Hi Nux,
>> 
>> As already mentioned we store the encrypted vm password using the ssh key, so we
>> need to reset the password also.
>> 
>> Regarding the password field in the DB, we have an API to get the VM password
>> (https://cloudstack.apache.org/docs/api/apidocs-4.5/root_admin/getVMPassword.html)
>> which gets encrypted password from DB.
>> 
>> Thanks,
>> Harikrishna
>> 
>> On 02-Apr-2015, at 5:07 am, Nux! <nu...@li.nux.ro> wrote:
>> 
>>> Somesh,
>>> 
>>> Why wouldn't the root password field in the DB just be left alone?
>>> 
>>> --
>>> Sent from the Delta quadrant using Borg technology!
>>> 
>>> Nux!
>>> www.nux.ro
>>> 
>>> ----- Original Message -----
>>>> From: "Somesh Naidu" <So...@citrix.com>
>>>> To: dev@cloudstack.apache.org
>>>> Sent: Thursday, 2 April, 2015 00:06:54
>>>> Subject: RE: reset sshkeyforvirtualmachine also resets password
>>> 
>>>> I believe so, since the VM's password (stored in the user_vm_details table)
>>>> needs to be encrypted using the new keys and I believe encryption is a one-way
>>>> hash.
>>>> 
>>>> Somesh
>>>> CloudPlatform Escalations
>>>> Citrix Systems, Inc.
>>>> 
>>>> 
>>>> -----Original Message-----
>>>> From: Nux! [mailto:nux@li.nux.ro]
>>>> Sent: Wednesday, April 01, 2015 9:16 AM
>>>> To: dev
>>>> Subject: reset sshkeyforvirtualmachine also resets password
>>>> 
>>>> Hi,
>>>> 
>>>> I've just noticed resetsshkeyforvirtualmachine also resets the root password.
>>>> This doesn't sound right. Is this supposed to happen?
>>>> 
>>>> 4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM
>>>> 
>>>> --
>>>> Sent from the Delta quadrant using Borg technology!
>>>> 
>>>> Nux!
>>>> www.nux.ro


Re: reset sshkeyforvirtualmachine also resets password

Posted by Nux! <nu...@li.nux.ro>.
Thanks Harikrishna, I did not know the password would get encrypted with the ssh key.
What happens when there is no ssh key registered, how are the passwords encrypted then?

Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
> From: "Harikrishna Patnala" <ha...@citrix.com>
> To: "<de...@cloudstack.apache.org>" <de...@cloudstack.apache.org>
> Sent: Thursday, 2 April, 2015 07:17:54
> Subject: Re: reset sshkeyforvirtualmachine also resets password

> Hi Nux,
> 
> As already mentioned we store the encrypted vm password using the ssh key, so we
> need to reset the password also.
> 
> Regarding the password field in the DB, we have an API to get the VM password
> (https://cloudstack.apache.org/docs/api/apidocs-4.5/root_admin/getVMPassword.html)
> which gets encrypted password from DB.
> 
> Thanks,
> Harikrishna
> 
> On 02-Apr-2015, at 5:07 am, Nux! <nu...@li.nux.ro> wrote:
> 
>> Somesh,
>> 
>> Why wouldn't the root password field in the DB just be left alone?
>> 
>> --
>> Sent from the Delta quadrant using Borg technology!
>> 
>> Nux!
>> www.nux.ro
>> 
>> ----- Original Message -----
>>> From: "Somesh Naidu" <So...@citrix.com>
>>> To: dev@cloudstack.apache.org
>>> Sent: Thursday, 2 April, 2015 00:06:54
>>> Subject: RE: reset sshkeyforvirtualmachine also resets password
>> 
>>> I believe so, since the VM's password (stored in the user_vm_details table)
>>> needs to be encrypted using the new keys and I believe encryption is a one-way
>>> hash.
>>> 
>>> Somesh
>>> CloudPlatform Escalations
>>> Citrix Systems, Inc.
>>> 
>>> 
>>> -----Original Message-----
>>> From: Nux! [mailto:nux@li.nux.ro]
>>> Sent: Wednesday, April 01, 2015 9:16 AM
>>> To: dev
>>> Subject: reset sshkeyforvirtualmachine also resets password
>>> 
>>> Hi,
>>> 
>>> I've just noticed resetsshkeyforvirtualmachine also resets the root password.
>>> This doesn't sound right. Is this supposed to happen?
>>> 
>>> 4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM
>>> 
>>> --
>>> Sent from the Delta quadrant using Borg technology!
>>> 
>>> Nux!
> >> www.nux.ro

Re: reset sshkeyforvirtualmachine also resets password

Posted by Harikrishna Patnala <ha...@citrix.com>.
Hi Nux,

As already mentioned we store the encrypted vm password using the ssh key, so we need to reset the password also.

Regarding the password field in the DB, we have an API to get the VM password (https://cloudstack.apache.org/docs/api/apidocs-4.5/root_admin/getVMPassword.html) which gets encrypted password from DB.

Thanks,
Harikrishna

On 02-Apr-2015, at 5:07 am, Nux! <nu...@li.nux.ro> wrote:

> Somesh,
> 
> Why wouldn't the root password field in the DB just be left alone?
> 
> --
> Sent from the Delta quadrant using Borg technology!
> 
> Nux!
> www.nux.ro
> 
> ----- Original Message -----
>> From: "Somesh Naidu" <So...@citrix.com>
>> To: dev@cloudstack.apache.org
>> Sent: Thursday, 2 April, 2015 00:06:54
>> Subject: RE: reset sshkeyforvirtualmachine also resets password
> 
>> I believe so, since the VM's password (stored in the user_vm_details table)
>> needs to be encrypted using the new keys and I believe encryption is a one-way
>> hash.
>> 
>> Somesh
>> CloudPlatform Escalations
>> Citrix Systems, Inc.
>> 
>> 
>> -----Original Message-----
>> From: Nux! [mailto:nux@li.nux.ro]
>> Sent: Wednesday, April 01, 2015 9:16 AM
>> To: dev
>> Subject: reset sshkeyforvirtualmachine also resets password
>> 
>> Hi,
>> 
>> I've just noticed resetsshkeyforvirtualmachine also resets the root password.
>> This doesn't sound right. Is this supposed to happen?
>> 
>> 4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM
>> 
>> --
>> Sent from the Delta quadrant using Borg technology!
>> 
>> Nux!
>> www.nux.ro


Re: reset sshkeyforvirtualmachine also resets password

Posted by Nux! <nu...@li.nux.ro>.
Somesh,

Why wouldn't the root password field in the DB just be left alone?

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
> From: "Somesh Naidu" <So...@citrix.com>
> To: dev@cloudstack.apache.org
> Sent: Thursday, 2 April, 2015 00:06:54
> Subject: RE: reset sshkeyforvirtualmachine also resets password

> I believe so, since the VM's password (stored in the user_vm_details table)
> needs to be encrypted using the new keys and I believe encryption is a one-way
> hash.
> 
> Somesh
> CloudPlatform Escalations
> Citrix Systems, Inc.
> 
> 
> -----Original Message-----
> From: Nux! [mailto:nux@li.nux.ro]
> Sent: Wednesday, April 01, 2015 9:16 AM
> To: dev
> Subject: reset sshkeyforvirtualmachine also resets password
> 
> Hi,
> 
> I've just noticed resetsshkeyforvirtualmachine also resets the root password.
> This doesn't sound right. Is this supposed to happen?
> 
> 4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM
> 
> --
> Sent from the Delta quadrant using Borg technology!
> 
> Nux!
> www.nux.ro

RE: reset sshkeyforvirtualmachine also resets password

Posted by Somesh Naidu <So...@citrix.com>.
I believe so, since the VM's password (stored in the user_vm_details table) needs to be encrypted using the new keys and I believe encryption is a one-way hash.

Somesh
CloudPlatform Escalations
Citrix Systems, Inc.


-----Original Message-----
From: Nux! [mailto:nux@li.nux.ro] 
Sent: Wednesday, April 01, 2015 9:16 AM
To: dev
Subject: reset sshkeyforvirtualmachine also resets password

Hi,

I've just noticed resetsshkeyforvirtualmachine also resets the root password. 
This doesn't sound right. Is this supposed to happen?

4.4.3 RC2 (4.4-RC20150324T1321) CentOS/KVM 

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro