Work on Euler
Note: This page was created by Ali using Claude. It has not been fully tested on a fresh computer, so some steps may need adjustment.
Connecting to Euler and Setting Up Nexus-e
This guide walks you through connecting to the ETH Euler cluster, setting up SSH keys for Github, and cloning the Nexus-e repository — all within VSCode.
Why do we need this?
If we want to run simulations or jobs on Euler (ETH's high-performance computing cluster), we need to connect to it first. There are several ways to do this, but VS Code is recommended because it provides a more integrated experience.
Reminder
Connecting to the Euler cluster requires you to either be within the ETH network or connected via the ETH VPN.
Overview: SSH Keys in This Setup
This guide involves two separate SSH keys, which serve different purposes:
| Key | Direction | Purpose | Required? |
|---|---|---|---|
| Euler key | Your local machine → Euler | Passwordless login to the cluster | Optional (password works) |
| Github key | Euler → Github | Clone and push repositories from Euler | Required for SSH cloning |
You can complete Part 1 using just your ETH password — no SSH key needed. The keys come into play in Parts 1b and 2.
Part 1: Connect to Euler via VSCode
No SSH key is needed for this step. You will log in with your ETH username and password.
Prerequisites
You need the Remote - SSH extension installed in VSCode. If you don't have it:
- Open Extensions (
Ctrl+Shift+X) - Search for "Remote - SSH"
- Install the extension by Microsoft
Steps to Connect
- Open a new VSCode window
-
File→New Window(orCtrl+Shift+N) -
Open the Remote Connection menu
- Click the green remote indicator in the bottom-left corner of VSCode
-
Or press
F1and typeRemote-SSH: Connect to Host -
Connect to Host
- Select "Connect to Host..."
-
Enter:
username@euler.ethz.ch(replaceusernamewith your ETH username) -
Enter your password
-
When prompted, enter your ETH password
-
Done!
- Once connected, you can open folders on Euler and work remotely
Using the Terminal
To open a terminal in VSCode while connected to Euler:
- Click on the top menu Terminal
- Click on New Terminal
This will open a terminal session directly on Euler where you can run commands, submit jobs, etc.
Part 1b: (Optional) Set Up Passwordless Login to Euler
If you find it inconvenient to enter your ETH password every time you connect, you can set up an SSH key on your local machine and register it with Euler. This is optional but recommended for regular use.
1. Check for an Existing SSH Key on Your Local Machine
Open a terminal on your local machine (not on Euler) and run:
Look for files like id_ed25519 or id_rsa. If they exist, skip to step 3.
2. Generate a New SSH Key on Your Local Machine
Press Enter to accept the default file location. You can optionally set a passphrase or leave it empty.
3. Copy Your Public Key to Euler
Enter your ETH password when prompted. After this, VSCode and terminal connections to Euler will no longer require a password.
Part 2: Set Up an SSH Key on Euler for Github
To clone repositories from Github, Euler itself needs its own SSH key registered with your Github account. This is separate from any key on your local machine — it is a one-time setup done from within the Euler terminal.
1. Check for an Existing SSH Key on Euler
In the Euler terminal (via VSCode or any SSH session), run:
Look for files like id_ed25519 or id_rsa. If they exist, skip to step 3.
2. Generate a New SSH Key on Euler
Press Enter to accept the default file location. You can optionally set a passphrase or leave it empty.
3. Copy Your Public Key
Copy the entire output to your clipboard.
4. Add the Key to Github
- Go to Github → Avatar (top right) → Settings → SSH and GPG keys
- Paste your public key into the Key field
- Give it a recognizable title (e.g.,
Euler cluster) - Click Add key
5. Test the Connection
You should see:
Part 3: Clone the Nexus-e Repository
Once your SSH key is set up, clone the repository into your desired location on Euler:
If you prefer HTTPS (no SSH key required), you can use:
Part 4: Open the Repository in VSCode
Once cloned, you can open the repository folder directly in VSCode:
- In VSCode, go to File → Open Folder
- Navigate to the cloned
nexus-edirectory on Euler - Click OK
You now have the full repository available in the VSCode Explorer, with an integrated terminal connected to Euler for running simulations and jobs.