1
votes

I'm trying to use Azure DevOps to deploy a Laravel application to a Bluehost website.

The idea is that when I commit changes to my repo, that a pipeline will trigger and will run composer, then deploy to the website.

The issue I am having, is that authentication with Bluehost fails, even after I've authorized the SSH key(I may only authorize public keys).

Error: Failed to connect to remote machine. Verify the SSH service connection details. Failed to connect to remote machine. Verify the SSH service connection details. Error: All configured authentication methods failed..

My theory, is that DevOps is generating a new public key to log into BlueHost, which fails to authenticate(as it's not the authorized public key).

I see that there is an "Install SSH Key" task I can use; however, I don't understand how to use the downloaded key in the "Copy over SSH" task.

How can I use a public key in an Azure DevOps pipeline Copy over SSH task?

1

1 Answers

1
votes

The prerequisites of using Copy Files Over SSH task are as below:

  • The task supports use of an SSH key pair to connect to the remote machine(s).
  • The public key must be pre-installed or copied to the remote machine(s).

When you use Install SSH Key task, the SSH keys are installed on the remote machine. You don't need to download it in Copy Files Over SSH task. Check the following example:

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/install-ssh-key?view=azure-devops#example-setup-using-github