Skip to content

Commit

Permalink
[STYLE] Present more demonstrative options in port forwarding example
Browse files Browse the repository at this point in the history
  • Loading branch information
gkaf89 committed Nov 13, 2024
1 parent 24f0bed commit 560ff44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/connect/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,12 +541,14 @@ In the `<node address>` option you can use the node IP address or the node name.

#### Port forwarding over SSH jumps

You can combine the jump command with other options, such as [port forwarding](#ssh-port-forwarding), for instance to access from you local machine a web server running in a compute node. Assume for instance you have a server running in `iris-014` and listens at port `2222`, and that you would like to forward the port `2222` to the `2222` port of you local machine. The, call the port forwarding command with a jump though the login node:
You can combine the jump command with other options, such as [port forwarding](#ssh-port-forwarding), for instance to access from you local machine a web server running in a compute node. Assume for instance that you have a server running in `iris-014` and listens at the IP `127.0.0.1` and port `2222`, and that you would like to forward the remote port `2222` to the `2222` port of you local machine. The, call the port forwarding command with a jump though the login node:

```bash
ssh -J iris-cluster -L 1111:iris-014:2222 <cluster username>@iris-014
ssh -J iris-cluster -L 1111:127.0.0.1:2222 <cluster username>@iris-014
```

This command can be combined with [passwordless access](#passwordless-ssh-jumps) to the cluster node.

## Extras Tools around SSH

* [Assh](https://github.com/moul/advanced-ssh-config) - Advanced SSH config is a transparent wrapper that make `~/.ssh/config` easier to manage
Expand Down

0 comments on commit 560ff44

Please sign in to comment.