Docker Community Forums

Share and learn in the Docker community.

Azure Swarm Deployment Fails: SSH publicKeys.keyData is invalid

docker
dockercloud
azure

(Johnmeredith) #1

Hi there,
I am getting failed Azure deployments due to the SSH key

From Docker Cloud:
[2017-06-27T11:01:05.4112168Z] EvaluateDeploymentOutput: Failed/Conflict (in PT0.2955681S)

When I look in Azure I get the error as follows:
The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid.

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InvalidParameter\",\r\n \"target\": \"linuxConfiguration.ssh.publicKeys.keyData\",\r\n \"message\": \"The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid.\"\r\n }\r\n}"},{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InvalidParameter\",\r\n \"target\": \"linuxConfiguration.ssh.publicKeys.keyData\",\r\n \"message\": \"The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid.\"\r\n }\r\n}"}]}

I have tried to create a new set of keys using ssh-keygen -t rsa -b 2048 in GIT bash but this didn’t help. I have successfully created a Docker container on Azure so know my subscription works ok.


(Anilskp) #2

Hi

I too got the same error. I got it working by the following step.

  1. Created new VM with the same ssh public key. Once done log in to the server take the content of the authorized_keys file… in ubuntu it is in the folder $HOME/.ssh/authorized_keys. it is the public key

  2. Use that while creating the swarm cluster… it worked for me

Regards
Anil Shafeeque