Skip to content

An example project that runs a command in a remote environment via SSH.

Notifications You must be signed in to change notification settings

calkit/example-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH example

Project page | GitHub repo

A Calkit example project that executes a command on a remote server using SSH, automatically copying project files back and forth.

Note this will probably fail if run from Windows for a Unix-like host because Git will probably check out files with the wrong line endings and send those over. This is configurable, however.

Setup

Create an SSH key and add it to the agent

See these docs.

This is only necessary if you haven't done this before. Optionally, you can create a new key just for this host. Don't use a passphrase if you want your commands to run without entering it each time. This should be okay if your machine is secure.

Add your SSH key to the server

Assuming you've created one and added it to the agent, call:

ssh-copy-id $USER@$HOST

If created a unique key for this remote host, use the -i flag to specify that key file.

Fill in the correct environment details

In calkit.yaml, there is an environment called cluster. Replace any relevant values there to match your remote machine.

Running the pipeline

Execute:

calkit run

Releases

No releases published

Packages

No packages published

Languages