Learning Outcomes
- Understand how to create or enter existing SSH key pairs.
- Identify the steps to use your own SSH keys or generate new ones.
- Learn how to securely store and use SSH keys for establishing connections.
SSH Keys
In most cases, your SSH key is automatically configured for you. However, if you're submitting jobs to an HPC/cluster environment, you may need to define SSH keys in Foundry.
Determine your setup
Case 1: Your SSH key is already configured (most users)
To confirm your SSH credentials are already set up:
- Go to Profile.
- Open the Credentials tab.
- Look for an existing SSH credential.
If you see an SSH credential, you’re done. If you don’t, continue to Case 2.
Case 2: You’re submitting jobs to an HPC/cluster environment
If you submit jobs to an HPC/cluster environment, you need to define SSH keys in Foundry so Foundry can authenticate to the cluster.
Create SSH keys in Foundry

To create an SSH key pair:
- Click "Create Credential".
- In the Credential Type section select "SSH".
- To generate a new pair of SSH keys, assign a name in the Credential Name section and click Generate Keys for Me, then click Save.
Once you have saved your SSH key, your information will be encrypted and securely stored.
Authorize the key on your cluster
To establish a secure connection, you need to add your public key to the ~/.ssh/authorized_keys file on the host machine (your cluster). This step ensures that your public key is recognized and authorized for secure communication with the host.
-
Connect to your HPC/cluster login node:
ssh your-username@your-cluster-hostnameUsing Terminal (macOS/Linux):
- Open Terminal (macOS: Spotlight → “Terminal”; Linux: Applications → “Terminal”).
- Replace:
your-usernamewith your HPC account usernameyour-cluster-hostnamewith the cluster login address (for example,login.myhpc.edu)
- If prompted the first time you connect, type
yesand press Enter.
Using Windows Terminal / PowerShell (Windows):
- Open Windows Terminal or PowerShell.
- Run the same
ssh your-username@your-cluster-hostnamecommand. - If prompted the first time you connect, type
yesand press Enter. - If your organization uses PuTTY, you can connect using PuTTY instead with the hostname and your username.
-
On the cluster, create
~/.ssh/authorized_keysfile (if needed) and set secure permissions:mkdir -p ~/.ssh && chmod 700 ~/.ssh touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys -
Switch back to Foundry to copy your public key:
- Open your SSH credential.
- Click the three-dot (⋮) menu next to the key and select View.
- Click Copy.

-
Append your public key to
~/.ssh/authorized_keysby running the command below, replacingPASTE_PUBLIC_KEY_HEREwith the public key you copied from Foundry:echo "PASTE_PUBLIC_KEY_HERE" >> ~/.ssh/authorized_keys>>means append (it will not overwrite the file).- The public key should be one line and typically starts with
ssh-ed25519orssh-rsa. (e.g.sh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... user@foundry)
-
(Optional) Verify it was added. The command below should print the public key you just added.
cat ~/.ssh/authorized_keys
Use Your Own Keys (optional)
If you choose Use Your Own Keys (instead of Generate Keys for Me), you must paste both your private key and public key into Foundry. These files are typically located at:
~/.ssh/id_rsafor the private key~/.ssh/id_rsa.pubfor the public key
Need Assistance?
If you require help with adding your public key or have any questions, please don't hesitate to contact us at support@viascientific.com.