Skip to content

Commit

Permalink
[REFACTOR:ssh] Add section about SSH jumps in the SSH documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gkaf89 committed Jul 15, 2024
1 parent d35c18d commit 9684118
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/connect/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,26 @@ You can forward a remote port back to a host protected by your firewall.
By using the `-g` parameter, you allow connections from other hosts than localhost to use your SSH tunnels. Be warned that anybody within your network may access the tunnelized host this way, which may be a security issue.


### SSH jumps

Compute nodes are not directly accessible through the network. To login into a cluster node you will need to jump through a login node. The ssh agent is [not configured in the login nodes](#on-ulhpc-clusters) for security reasons. To configure a jump to a compute node, you will need to install a key in your ssh configuration. Create a key in your local machine,
```bash
ssh-keygen -a 127 -t ed25519 -f ~/.ssh/hpc_id_ed25519
```
and then copy both the private and public keys in your HPC account,
```bash
scp ~/.ssh/hpc_id_ed25519* aion-cluster:~/.ssh/
```
where the command assumes that you have setup your [SSH configuration file](#ssh-configuration). Finally, add the key to the list of authorized keys:
```bash
ssh-copy-id -i ~/.ssh/hpc_id_ed25519 aion-cluster
```
Then you can connect to any compute node to which you have a job running with the command:
```bash
ssh -i ~/.ssh/hpc_id_ed25519 -J ${USER}@access-aion.uni.lu:8022 ${USER}@<node address>
```

Usually the node address can be the node IP of the node name. You can combine this command with other options, such as [port forwarding](#ssh-port-forwarding), for instance to access a web server running in a compute node.

## Extras Tools around SSH

Expand Down
2 changes: 1 addition & 1 deletion docs/services/jupyter.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The following script is an example how to proceed:
jupyter lab list
jupyter --paths
jupyter kernelspec list
echo "Enter this command on your laptop: ssh -p 8022 -NL 8888:$(hostname -i):8888 ${USER}@access-iris.uni.lu " > notebook.log
echo "Enter this command on your laptop: ssh -i ~/.ssh/hpc_id_ed25519 -J ${USER}@access-iris.uni.lu:8022 -L 8888:$(hostname -i):8888 ${USER}@$(hostname -i)" > notebook.log
wait $pid
```

Expand Down

0 comments on commit 9684118

Please sign in to comment.