Remote Registration#

If you do not have access to Docker on your local machine, lack space on your local filesystem for image layers, or lack fast internet to facilitate timely registration, you can use the --remote flag with latch register to build and upload your workflow’s images from a latch-managed, performant, remote machine.

$ latch register myworkflow --remote
Initializing registration for /path/to/myworkflow
Connecting to remote server for docker build [alpha]...

The registration process will behave as usual, but the build/upload will not occur on your local machine and instead will happen on a remote instance.

Troubleshooting#

Here are a few common bugs users have run into while using remote registration, as well as some suggestions on how to fix them.

Permission denied#

$ latch register myworkflow --remote
...
Could not open a connection to your authentication agent.
ubuntu@52.38.67.53: Permission denied (publickey).
Unable to register workflow: Unable to establish a connection to remote docker host ssh://ubuntu@52.38.67.53.

This error happens if either (a) your SSH Agent is not running, or (b) none of your SSH identities (public/private key pairs) are loaded into your agent.

To (re)start your SSH Agent on a Unix/macOS system, simply run

$ eval `ssh-agent -s`
...

To see what identities are loaded into your agent, run

$ ssh-add -l
...

If you don’t see your identity file show up, run

ssh-add ~/.ssh/identity

to add it. If you don’t have an identity file set up, see the section below.

Unable to find a valid key#

$ latch register myworkflow --remote
...
Unable to register workflow: It seems you don\'t have any (valid) SSH keys set up. Check that any keys that you have are
valid, or use a utility like `ssh-keygen` to set one up and try again.

Latch uses your SSH key pair for authentication to the remote machine when building your workflow’s docker image. This error means you either don’t have an SSH key pair on your machine or your keys are corrupted.

First, verify that you have an SSH key pair by inspecting the ~/.ssh folder:

$ ls ~/.ssh
config  id_rsa  id_rsa.pub  known_hosts

If you don’t see something of the form id_* and id_*.pub (in this case id_rsa and id_rsa.pub), this means that you don’t have any public/private key pairs on this computer, so you’ll have to make some using ssh-keygen:

$ ssh-keygen
Generating public/private rsa key pair.
...

If you do have an identity file, try to use ssh-keygen again to validate the key.

ssh-keygen -l -f id_rsa.pub

At this point, you should have a response indicating if the key is invalid. If the key isn’t invalid, make sure the SSH Agent has loaded it (see above).


Still can’t find a working solution for your issue? Please join our SDK support slack here.