Skip to content

Open a shell

A machine answers ssh through the Deployport SSH gateway, so it needs no public address and no inbound rule for you to reach it.

Your ssh key reaches a machine through your Deployport user, and nothing is installed on the machine. The gateway checks the key on every connection, so a key removed from your user is refused everywhere at once.

deployport machinery ssh adds the key this computer already uses to your user on its first connection, so there is usually nothing to set up. To add a key from somewhere else, or to see what reaches your machines:

Open the profile menu and choose SSH Keys. A key there is yours, it reaches every machine you can reach, and it goes when your user does.

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. Flags for it go before the machine, because everything after the machine id goes to ssh itself. A port forward is:

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

The session opens as the machine’s login user. Name another one to connect as somebody else:

Terminal window
deployport machinery ssh <os-user>@<machine-id>

Every machine answers on a name of its own, so any ssh client reaches it with no Deployport binary installed. The console prints the exact line to copy, on the machine’s page.

The line has two forms, and the machine’s name and address decide which one it gets. A machine with an address of its own is reached at its name. A machine with no address of its own is reached through the shared gateway, which carries the machine id in the user part.

Paste the line as the console prints it. Its form is not fixed, so a line rebuilt from the machine id can name a host that does not answer.

Connecting to a stopped machine starts it and waits for it to answer. This form carries no user name, because the key you connect with decides which user you land as.

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

Terminal window
deployport machinery set-login-user <machine-id> <os-user>

Leave it unset and the machine’s own default applies. deployport machinery settings <machine-id> shows the login user in effect and what set it.

Terminal window
deployport machinery ssh <machine-id>

The session opens as the machine’s login user. If a connection is refused, Machine and ssh failures names the cause.