How to use SSH keys in freestyle steps
Running commands remotely from Codefresh Pipeline
You can easily connect to external servers in Codefresh pipelines and run commands with them via SSH.
First, you need to create or find a Docker image with the SSH client. A good choice is https://hub.docker.com/r/praqma/network-multitool as it has several other networking tools inside.
Then create a freestyle step in your pipeline like this:
The pipeline expects some variables called
SSH_KEY, MY_USER, MY_HOST that you can enter directly in the pipeline or fetch from shared configuration.
uptime, with your own command that you want executed on the remote host.
What to read next