Set-up ssh
to io
and hpc05
#
SSH is a secure way to access remote computers. We use SSH to push to the group’s gitlab repositories, but additionally to connect to the group’s jupyterhub io
, the Kavli institute cluster hpc05
, and the university cluster delftblue
.
The instructions below assume that you have a basic familiarity with the terminal.
To set everything up you need an active TU Delft NetID and you should be able to log in to intranet. You need to request access to hpc05 separately from Anton.
Step 0#
Generate a ssh
key on your laptop if you don’t have one yet. See here how to do it.
Step 1#
Get your new public key (see it with cat ~/.ssh/id_rsa.pub
) to the .ssh/authorized_keys
file on io
.
Now you should have ssh access to io
.
Step 2#
Add the servers to your ssh config with nano ~/.ssh/config
(change YOUR_NETID):
# TU Delft SSH gateway server
Host tudelft
HostName linux-bastion-ex.tudelft.nl
User YOUR_NETID
Host qt1
HostName qt1.tudelft.net
ProxyCommand ssh -W %h:%p tudelft
Host io
User tinkerer
Proxycommand ssh -q jupyterhub-quantumtinkerer@qt1
# Kavli institute cluster
Host hpc05
HostName hpc05.tudelft.net
User YOUR_NETID
# TU Delft cluster
Host delftblue
User YOUR_NETID
Hostname login.delftblue.tudelft.nl
ProxyCommand ssh -W %h:%p bastion
Step 4#
Setup passwordless ssh
:
Obtain ssh-copy-id
.
On Linux it is available; on a Mac you’ll need to get homebrew and execute brew install ssh-copy-id
.
From your own computer get access to, tudelft
, io
, and hpc05
.
Copy your key to tudelft
and hpc05
so that you don’t need to type your password every time:
ssh-copy-id tudelft
ssh-copy-id hpc05
ssh-copy-id delftblue
Try to ssh into io
, with ssh io
.
Now let us set up passwordless ssh from io to hpc05.
io
should already have an ssh key generated for you automatically, so we get it and copy it to hpc05
:
scp io:.ssh/id_rsa.pub hpc05:id_rsa.pub && ssh hpc05 -C "cat id_rsa.pub >> .ssh/authorized_keys && rm id_rsa.pub"
Finally, add the section with hpc05
to io
’s ~/.ssh/config
:
Host hpc05
HostName hpc05.tudelft.net
User YOUR_NETID
Next steps#
Now you should be able to execute: ssh io
-> ssh hpc05
.
If you are usinv VSCode, you can also launch it on io
after configuring it.