To deploy using SSH and SCP with CloudBees CodeShip Pro, you will need to create a container that can connect to your server via SSH. Then, you will pass this container the necessary deployment commands.
Please follow our outlined steps on setting your private SSH key before proceeding
After the private SSH key configuration is complete, you can add SSH/SCP deploy commands to the codeship-steps.yml file:
- name: Copy Files service: app command: scp -r /app/ email@example.com:app/ - name: Restart Server service: app command: ssh firstname.lastname@example.org restart_server
If your SSH authentication commands are failing, there are several troubleshooting steps to take.
First, try connecting using that key locally to verify the key and the corresponding public key are configured and working as intended.
Next, try running your deployments locally with our local CLI tool to see if you receive the same error messages.
Ensure that your target endpoints are acknowledged in your
Often times these issues are related to character escaping or issues loading the key into the proper directory, so running
lscommands will help you verify that the correct key has been loaded and that it is where you want it to be.