Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REFACTOR:ssh] Add section about SSH jumps in the SSH documentation #69

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading