Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Azure API issue with SSH Keys

$
0
0

I'm facing an issue with Azure API. I'm trying to provision a linux instance with Azure API. This instance is to have ssh key authentication, ssh password would be disabled. T request fails with 'Bad-Request' response. I'm following documentation at [1]. PFA xml request & response. 

[1] http://msdn.microsoft.com/en-us/library/windowsazure/jj157194

=== Request ===

<Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Name>ms091320121</Name>
  <DeploymentSlot>Production</DeploymentSlot>
  <Label>bXMwOTEzMjAxMjE=</Label>
  <RoleList>
    <Role i:type="PersistentVMRole">
      <RoleName>msrole09142012_1</RoleName>
      <OsVersion i:nil="true"/>
      <RoleType>PersistentVMRole</RoleType>
      <ConfigurationSets>
  <ConfigurationSet i:type="LinuxProvisioningConfigurationSet">
    <ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType>
    <HostName>mshost09142012_1</HostName>
    <UserName>mohit</UserName>
    <UserPassword>Cloudy21!</UserPassword>
    <DisableSshPasswordAuthentication>true</DisableSshPasswordAuthentication>
    <SSH>
      <PublicKeys>
        <PublicKey>
          <FingerPrint>61651d7a7faf3d8479ea9ec160edb8ce632f2c21</FingerPrint>
          <Path>/home/mohit/.ssh/authorized_keys</Path>
        </PublicKey>
      </PublicKeys>
      <KeyPairs>
        <KeyPair>
          <FingerPrint>61651d7a7faf3d8479ea9ec160edb8ce632f2c21</FingerPrint>
          <Path>/home/mohit/.ssh/id_rsa</Path>
        </KeyPair>
      </KeyPairs>
    </SSH>
  </ConfigurationSet>
  <ConfigurationSet i:type="NetworkConfigurationSet">
    <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
    <InputEndpoints>
      <InputEndpoint>
        <LocalPort>22</LocalPort>
        <Name>SSH</Name>
        <Port>22</Port>
        <Protocol>TCP</Protocol>
      </InputEndpoint>
    </InputEndpoints>
  </ConfigurationSet>
</ConfigurationSets>
      <Label>bXNyb2xlMDkxNDIwMTJfMQ==</Label>
      <OSVirtualHardDisk>
  <MediaLink>http://portalvhdsjr95wdk275yyg.blob.core.windows.net/vhds/disk_2012_09_17_09_09.vhd</MediaLink>
  <SourceImageName>OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd</SourceImageName>
</OSVirtualHardDisk>
      <RoleSize>Medium</RoleSize>
    </Role>
  </RoleList>
</Deployment>


=== Response ===

WARN: BadRequest : Fingerprint and Path in SSHKeyPair should not be null or empty.
FATAL: Unable to create role:BadRequest : Fingerprint and Path in SSHKeyPair should not be null or empty.

===


Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>