Skip to content

Open a shell

A machine answers ssh through a gateway, so it needs no public address and no open port for you to reach it.

Add the public key you already use:

Terminal window
deployport machinery ssh-keys create --title "laptop" --public-key-file ~/.ssh/id_ed25519.pub

The key belongs to the account, so every machine can use it. A factory can also seed keys that its machines start with, which is the place for a deployment key that belongs to no person.

Terminal window
deployport machinery ssh <machine-id>

The command starts the machine if it is stopped, waits for it to answer, and hands the terminal to ssh. Arguments after the machine id go to ssh itself, so a port forward is:

Terminal window
deployport machinery ssh <machine-id> -L 8080:localhost:8080

A machine carries its own key list on top of the account’s, for the case where one machine should admit somebody the rest should not:

Terminal window
deployport machinery machines ssh-keys add <machine-id> --key <key-name>

The login user is a machine setting. Set it once on the machine, and ssh uses it from then on:

machines set-login-user <machine-id> <os-user>

Leave it unset and the machine’s own default applies.