You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Gaurav Aradhye <ga...@clogeny.com> on 2013/09/12 13:59:36 UTC

Creating an instance with ssh key pair

Hello all,

If I create an instance providing ssh key pair while creation, and using a
"normal template" from the cloudstack setup, then will the SSH to vm using
the keyPairFlieLocation always work?

Or the template which I am using for creating the instance has to be
supporting SSH keys? as explained in 5.2.1 section at
http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html

In short, Is the SSH using keyPairFileLocation -  template dependent or
will it always work if I provide ssh key pair while creating instance and
use normal template?

Regards,
Gaurav

RE: Creating an instance with ssh key pair

Posted by Sanjeev Neelarapu <sa...@citrix.com>.
Hi Gaurav,

SSH to vm using keyPairFileLocation is template dependent .ie. template must have the script as mentioned in the doc.

Thanks,
Sanjeev

-----Original Message-----
From: Gaurav Aradhye [mailto:gaurav.aradhye@clogeny.com] 
Sent: Thursday, September 12, 2013 5:30 PM
To: dev@cloudstack.apache.org
Subject: Creating an instance with ssh key pair

Hello all,

If I create an instance providing ssh key pair while creation, and using a "normal template" from the cloudstack setup, then will the SSH to vm using the keyPairFlieLocation always work?

Or the template which I am using for creating the instance has to be supporting SSH keys? as explained in 5.2.1 section at http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html

In short, Is the SSH using keyPairFileLocation -  template dependent or will it always work if I provide ssh key pair while creating instance and use normal template?

Regards,
Gaurav

Re: Creating an instance with ssh key pair

Posted by Harikrishna Patnala <ha...@citrix.com>.
SSH script pulls only the ssh public key that is associated with the vm instance.
There is an API to reset the SSH key pair associated to the VM. This is will associate new ssh key pair to the vm and on reboot of vm this ssh script gets the new ssh public key into the VM.
If you can modify the ssh script in the vm to append the new ssh public key to the authorised_keys file we can use both old and new ssh key pair.

-Harikrishna

On 12-Sep-2013, at 9:35 PM, Travis Graham <tg...@tgraham.us> wrote:

> Will this only pull down one key pair or can it pull down many? We have a need to pull in our keys as well as all of our customers keys.
> 
> If the script can only pull down one, we can make it work, but would be nice to pull down all keys from the project an instance is associated with.
> 
> Travis
> 
> On Sep 12, 2013, at 11:55 AM, Sangeetha Hariharan <Sa...@citrix.com> wrote:
> 
>> To deploy Vm using ssh key pairs  you will need to use a template that has SSH Key Gen Scripts in it.
>> Only then you will be able to  ssh into the instance using ssh key.
>> 
>> -Thanks
>> Sangeetha
>> 
>> 
>> -----Original Message-----
>> From: Gaurav Aradhye [mailto:gaurav.aradhye@clogeny.com] 
>> Sent: Thursday, September 12, 2013 5:00 AM
>> To: dev@cloudstack.apache.org
>> Subject: Creating an instance with ssh key pair
>> 
>> Hello all,
>> 
>> If I create an instance providing ssh key pair while creation, and using a "normal template" from the cloudstack setup, then will the SSH to vm using the keyPairFlieLocation always work?
>> 
>> Or the template which I am using for creating the instance has to be supporting SSH keys? as explained in 5.2.1 section at http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html
>> 
>> In short, Is the SSH using keyPairFileLocation -  template dependent or will it always work if I provide ssh key pair while creating instance and use normal template?
>> 
>> Regards,
>> Gaurav
> 


Re: Creating an instance with ssh key pair

Posted by Travis Graham <tg...@tgraham.us>.
Will this only pull down one key pair or can it pull down many? We have a need to pull in our keys as well as all of our customers keys.

If the script can only pull down one, we can make it work, but would be nice to pull down all keys from the project an instance is associated with.

Travis

On Sep 12, 2013, at 11:55 AM, Sangeetha Hariharan <Sa...@citrix.com> wrote:

> To deploy Vm using ssh key pairs  you will need to use a template that has SSH Key Gen Scripts in it.
> Only then you will be able to  ssh into the instance using ssh key.
> 
> -Thanks
> Sangeetha
> 
> 
> -----Original Message-----
> From: Gaurav Aradhye [mailto:gaurav.aradhye@clogeny.com] 
> Sent: Thursday, September 12, 2013 5:00 AM
> To: dev@cloudstack.apache.org
> Subject: Creating an instance with ssh key pair
> 
> Hello all,
> 
> If I create an instance providing ssh key pair while creation, and using a "normal template" from the cloudstack setup, then will the SSH to vm using the keyPairFlieLocation always work?
> 
> Or the template which I am using for creating the instance has to be supporting SSH keys? as explained in 5.2.1 section at http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html
> 
> In short, Is the SSH using keyPairFileLocation -  template dependent or will it always work if I provide ssh key pair while creating instance and use normal template?
> 
> Regards,
> Gaurav


Re: Creating an instance with ssh key pair

Posted by Gaurav Aradhye <ga...@clogeny.com>.
Thanks Sangeetha. That was helpful.

Regards,
Gaurav


On Thu, Sep 12, 2013 at 9:25 PM, Sangeetha Hariharan <
Sangeetha.Hariharan@citrix.com> wrote:

> To deploy Vm using ssh key pairs  you will need to use a template that has
> SSH Key Gen Scripts in it.
> Only then you will be able to  ssh into the instance using ssh key.
>
> -Thanks
> Sangeetha
>
>
> -----Original Message-----
> From: Gaurav Aradhye [mailto:gaurav.aradhye@clogeny.com]
> Sent: Thursday, September 12, 2013 5:00 AM
> To: dev@cloudstack.apache.org
> Subject: Creating an instance with ssh key pair
>
> Hello all,
>
> If I create an instance providing ssh key pair while creation, and using a
> "normal template" from the cloudstack setup, then will the SSH to vm using
> the keyPairFlieLocation always work?
>
> Or the template which I am using for creating the instance has to be
> supporting SSH keys? as explained in 5.2.1 section at
> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html
>
> In short, Is the SSH using keyPairFileLocation -  template dependent or
> will it always work if I provide ssh key pair while creating instance and
> use normal template?
>
> Regards,
> Gaurav
>

RE: Creating an instance with ssh key pair

Posted by Sangeetha Hariharan <Sa...@citrix.com>.
To deploy Vm using ssh key pairs  you will need to use a template that has SSH Key Gen Scripts in it.
Only then you will be able to  ssh into the instance using ssh key.

-Thanks
Sangeetha
 

-----Original Message-----
From: Gaurav Aradhye [mailto:gaurav.aradhye@clogeny.com] 
Sent: Thursday, September 12, 2013 5:00 AM
To: dev@cloudstack.apache.org
Subject: Creating an instance with ssh key pair

Hello all,

If I create an instance providing ssh key pair while creation, and using a "normal template" from the cloudstack setup, then will the SSH to vm using the keyPairFlieLocation always work?

Or the template which I am using for creating the instance has to be supporting SSH keys? as explained in 5.2.1 section at http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Installation_Guide/using-sshkeys.html

In short, Is the SSH using keyPairFileLocation -  template dependent or will it always work if I provide ssh key pair while creating instance and use normal template?

Regards,
Gaurav