Skip to main content
Turn SSH on for a running runtime, connect from your machine, replace the key, or turn it off. The user is agent, and sudo needs no password. The response includes the port, the connect command, and the private key.

Turn SSH on

The response includes the user, port, connect command, and private key. Save the private key with permissions 600, then connect with connect_cmd.
Store private keys securely and set file permissions to 600.

Replace the key

Replace the SSH key when it may have been exposed, or on a regular schedule. Connect with the new command and remove the old key file.
  1. Call enable_ssh with regenerate_keys=True (CLI: --regenerate-keys).
  2. Save the new private key (permissions 600) and give it to the people who should connect.
  3. Remove the old key files.
  4. Connect with the new connect_cmd.

Turn SSH off

Turn SSH off when you no longer need a shell on the runtime. Check the status before and after.
Turn SSH off as soon as you no longer need it.

Endpoints