SSH, files and Terminal
SSH tabs and the file browser inside Ostgate, and plain ssh, scp and your IDE through Ostgate from outside it.
Updated
SSH and files
Choose Connect on a Linux instance. The first time, Ostgate creates your SSH key on this Mac, in the Secure Enclave where available, and publishes it for you: through OS Login when the instance or project enables it, otherwise through the instance's own metadata. OS Login keys expire after an hour and metadata keys after a day, and are renewed as you connect. On a VM that requires OS Login certificates, OS Login signs the key for that VM instead, and the certificate, valid for five minutes, stays in memory. OS Login with two-factor authentication is not supported.
The first connection to an instance that does not publish its host keys asks you to Verify the VM's SSH host key; check the fingerprint and choose Trust and Connect. From then on a different key stops the connection.
To open a tab without the mouse, press ⌘K, type part of the instance's name and press Return: on a Linux instance Return connects over SSH.
- Browse Files opens an SFTP browser for the same instance. Drag files and folders
in to upload, and files out to Finder to download. Download… saves a folder, or
several items at once, as one ZIP built on your Mac; nothing is written to the instance.
Folders and larger selections are packed with
taron the instance and streamed compressed, which is much faster for many small files; logins that allow SFTP only fall back to copying file by file. A folder that already exists is merged, and files are replaced only after you confirm. You can also drop a file on a terminal to upload it to your home folder. - Connect As… signs in with a username and your own private key, from a file or
from Secret Manager, for appliances that do not use OS Login. It publishes nothing to
the instance. OpenSSH ed25519 and RSA keys and unencrypted PEM RSA keys work; for other
PEM keys, re-encode first with
ssh-keygen -p -f KEY_FILE. - For password sign-in, set SSH auth to Password in connection settings. Save password for this VM keeps it in the Keychain.
- Show SSH Keys lists your OS Login keys and the instance's and project's metadata keys, and deletes the ones you no longer want.
Browse Files and Connect As… are not offered for Windows instances.
Cloud Shell
The Cloud Shell area (⌘4) has a card for each signed-in account's own Cloud Shell. Open Terminal starts it if it is stopped and opens a terminal tab; Browse Files opens the same file browser as for an instance, at your Cloud Shell home folder. You can also open the terminal from the toolbar, the account's menu in the rail, Session › Open Cloud Shell, or ⌘K and "Cloud Shell".
gcloud, kubectl and the other tools in the terminal are signed in as the account, as in the Cloud Console: Ostgate passes the account's access token to your Cloud Shell and renews it while the tab is open. To keep gcloud there signed out, turn off Sign in gcloud inside Cloud Shell for that account in Settings › Accounts.
Google's limits apply: Cloud Shell stops after 40 minutes without activity, a session lasts at most 12 hours, and the home folder holds 5 GB. When it stops, the tab says so and Reconnect starts it again. If your Google Workspace administrator turned Cloud Shell off for your account, the card says so and offers nothing to open.
Use ssh from Terminal
In Settings › SSH Integration, click Install. Ostgate adds one managed block to
~/.ssh/config, after which this works from any terminal, IDE,
scp or script, with Ostgate's window closed:
ssh INSTANCE.ZONE.PROJECT.gcp
The block only carries the connection through IAP, using your signed-in Ostgate accounts.
It tries them in turn, those with the instance's project pinned first, until IAP lets one
through; if none can connect, ssh shows each account's reason.
ssh signs in with your own keys from ~/.ssh and checks your own
known_hosts, so your public key must already be accepted by the instance:
added to your OS Login profile, or to the instance's or project's SSH keys metadata. The
optional OS Login username field adds a User line. Remove deletes
the block and nothing else.