Using VSCode to edit and run scripts on ARCHER2 - firedrakeproject/firedrake GitHub Wiki
Windows or WSL
If using WSL, just stick to Windows in the following.
- Install VSCode through the Microsoft store.
- Install the "Remote-SSH" extension within VSCode.
- Generate an ssh key using git bash in
\c\Users\local_username\.ssh\
, if you don't already have one. - Add this ssh key to your ARCHER2 account, if it hasn't already been.
- Append the following to
\c\Users\local_username\.ssh\config
:
Host login.archer2.ac.uk
HostName login.archer2.ac.uk
User archer_username
IdentityFile "C:\Users\local_username\.ssh\id_ed25519"
(This can also be done in VSCode by hitting F1
and searching for "Remote-SSH: Add new SSH host".)
- In VSCode, hit
F1
and search for "Remote-SSH: Connect to host". Selectlogin.archer2.ac.uk
from the list. Enter your ARCHER2 password when prompted. (You may also need to enter the password associated with your SSH key.) - You should now be able to explore files using the left panel and open a terminal using the "Terminal" menu at the top.
Linux or Mac
- Download VSCode from the website and install it.
- Install the "Remote-SSH" extension within VSCode.
- Generate an ssh key in
/home/local_username/.ssh/
, if you don't already have one. - Add this ssh key to your ARCHER2 account, if it hasn't already been.
- Append the following to
/home/local_username/.ssh/config
:
Host login.archer2.ac.uk
HostName login.archer2.ac.uk
User archer_username
IdentityFile "home/local_username/.ssh/id_ed25519"
(This can also be done in VSCode by hitting F1
and searching for "Remote-SSH: Add new SSH host".)
- In VSCode, hit
F1
and search for "Remote-SSH: Connect to host". Selectlogin.archer2.ac.uk
from the list. Enter your ARCHER2 password when prompted. (You may also need to enter the password associated with your SSH key.) - You should now be able to explore files using the left panel and open a terminal using the "Terminal" menu at the top.