Skip to content

Commit a1f3ef9

Browse files
authored
Merge pull request #199 from NYU-RTS/gateways_what_are_those
gateways, what are those?
2 parents 30cff4c + 63f58aa commit a1f3ef9

10 files changed

Lines changed: 33 additions & 220 deletions

docs/hpc/01_getting_started/03_walkthrough_request_hpc_account.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
44
# How to request an HPC account
55

66
:::tip
7-
Make sure you don't already have an HPC account. You can check this by attempting to log in to the cluster, according to the instructions at [Connecting to the HPC Cluster](../02_connecting_to_hpc/01_connecting_to_hpc.mdx).
7+
Make sure you don't already have an HPC account. You can check this by attempting to log in to the cluster, according to the instructions at [Connecting to the HPC Cluster](../02_connecting_to_hpc/01_connecting_to_hpc.md).
88
:::
99

1010
Login to the URL given below, using your NetID/password, to create or manage HPC Account Requests:

docs/hpc/01_getting_started/06_hpc_accounts_external_collaborators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ External (non-NYU) collaborators can access, with proper sponsorship, the NYU HP
1313
:::note
1414
Once the sponsoring faculty approves the account request, the HPC account is created within one hour.
1515
:::
16-
- Once the HPC account is created, the external collaborator can access HPC resources as described in our documentation page [Connecting to the HPC Cluster](../02_connecting_to_hpc/01_connecting_to_hpc.mdx).
16+
- Once the HPC account is created, the external collaborator can access HPC resources as described in our documentation page [Connecting to the HPC Cluster](../02_connecting_to_hpc/01_connecting_to_hpc.md).
1717

1818
:::note
1919
As with all sponsored accounts, HPC accounts for external collaborators are valid for a period of 12 months, at which point a renewal process is required to continue access to the NYU HPC environment. You can find information about renewing your account on our documentation page [Getting and Renewing an HPC Account](./02_getting_and_renewing_an_account.mdx).

docs/hpc/02_connecting_to_hpc/01_connecting_to_hpc.mdx renamed to docs/hpc/02_connecting_to_hpc/01_connecting_to_hpc.md

Lines changed: 18 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import Tabs from '@theme/Tabs';
2-
import TabItem from '@theme/TabItem';
3-
41
# Connecting to the HPC Cluster
52

6-
There are several ways to interact with the Greene HPC cluster. Similar to other Linux clusters, the most common method of connection is via a Command Line Interface (CLI). A CLI is a program that allows you to create and delete files, run programs, and navigate through directories and files via a typed prompt. On Mac, the built-in CLI application is called Terminal. While Windows 11 machines support a Linux Subsystem, which allows for similar functionality, a popular tool used to connect to a Linux server is a free application called [PuTTY][putty link].
3+
:::tip
4+
This page gives an overview of connecting to the HPC cluster, for a tutorial on this topic, head to the [this section](../12_tutorial_intro_shell_hpc/02_connecting_to_hpc.mdx)!
5+
:::
6+
7+
There are several ways to interact with the Greene HPC cluster. Similar to other Linux clusters, the most common method of connection is via a Command Line Interface (CLI). A CLI is a program that allows you to create and delete files, run programs, and navigate through directories and files via a typed prompt. On Mac, the built-in CLI application is called Terminal. While Windows 11 machines support a Linux Subsystem, which allows for similar functionality, a popular tool used to connect to a Linux server is a free application called [MoabXterm](https://mobaxterm.mobatek.net/documentation.html)
78

89
:::tip
910
If you'd prefer to access the HPC cluster via a web gateway instead, please refer to [the section describing Open OnDemand (OOD)](../09_ood/01_ood_intro.md).
@@ -15,21 +16,13 @@ The following sections will outline basic ways to connect to the Greene cluster.
1516
### Configuring Your SSH Client
1617
To connect to HPC systems, it's important to configure your machine's SSH client. For Linux and Mac machines, the configuration file is the ~/.ssh/config file on your computer. These are the basic lines that should be added to your ~/.ssh/config file:
1718
```sh
18-
Host greene.hpc.nyu.edu dtn.hpc.nyu.edu gw.hpc.nyu.edu
19+
Host greene.hpc.nyu.edu dtn.hpc.nyu.edu
1920
StrictHostKeyChecking no
2021
ServerAliveInterval 60
2122
ForwardAgent yes
2223
UserKnownHostsFile /dev/null
2324
LogLevel ERROR
2425

25-
Host hpcgwtunnel
26-
HostName gw.hpc.nyu.edu
27-
ForwardX11 no
28-
StrictHostKeyChecking no
29-
LocalForward 8027 greene.hpc.nyu.edu:22
30-
UserKnownHostsFile /dev/null
31-
User <Your NetID>
32-
3326
Host greene
3427
HostName localhost
3528
Port 8027
@@ -74,7 +67,7 @@ To avoid this warning, you can add these lines to your SSH configuration file. O
7467
This segment, referenced in the recommended config above will nullify the error:
7568

7669
```sh
77-
Host greene.hpc.nyu.edu dtn.hpc.nyu.edu gw.hpc.nyu.edu
70+
Host greene.hpc.nyu.edu dtn.hpc.nyu.edu
7871
StrictHostKeyChecking no
7972
ServerAliveInterval 60
8073
ForwardAgent yes
@@ -86,63 +79,35 @@ The above will also fix SSH timeout errors by extending the `ServerAliveInterval
8679
:::
8780

8881
### Connecting to the NYU Network
89-
To access the HPC systems, you must either be on the NYU secure network (such as the NYU WiFi or a wired connection from an NYU office) or use a method of accessing it, such as the NYU VPN or the HPC Gateway servers.
82+
To access the HPC systems, you must either be on the NYU secure network (such as the NYU WiFi or a wired connection from an NYU office) or use the NYU VPN.
9083

9184
:::info Connecting to the HPC clusters from outside NYU Network
92-
<Tabs>
93-
<TabItem value="VPN" label="VPN (Preferred)">
94-
[Set up your computer to use the NYU VPN][nyu vpn link]. Once you've created a VPN connection, you can proceed as if you were connected to the NYU net
95-
</TabItem>
96-
<TabItem value="Gateway" label="Gateway">
97-
Go through our gateway servers (example below). Gateways are designed to support only a very minimal set of commands and their only purpose is to let users connect HPC systems without needing to first connect to the VPN
98-
</TabItem>
99-
</Tabs>
85+
[Set up your computer to use the NYU VPN][nyu vpn link]. Once you've created a VPN connection, you can proceed as if you were connected to the NYU net
10086
:::
10187

10288
## Command Line Interface (with a Terminal)
10389

10490
### Mac & Linux Access
10591

106-
#### VPN Connection
107-
If you're on the VPN or the main NYU network on campus you can SSH directly to greene like so:
92+
Once you're on the VPN or the main NYU network on campus you can SSH directly to greene like so:
10893

10994
```sh
11095
ssh <Your NetID>@greene.hpc.nyu.edu
11196
```
11297

113-
#### Gateway / SSH Tunneling Option
114-
115-
To connect to the gateway servers, after you've configured your ~/.ssh/config file, simply open a [terminal application][apple terminal link] and follow these steps:
116-
117-
1. Open a terminal
118-
2. Connect to the gateway via the ssh command:
119-
```sh
120-
ssh hpcgwtunnel
121-
```
122-
3. Authenticate with your password and Duo MFA
123-
124-
4. Open a second terminal
125-
5. Connect to the Greene login nodes via the ssh command:
126-
```sh
127-
ssh greene
128-
```
129-
6. Authenticate
130-
131-
After typing in your password you will be logged in to the cluster.
98+
### Windows
13299

133-
### Windows CMD
100+
#### Powershell
101+
You can access the ssh client via Powershell, either by installing [Windows Terminal](https://apps.microsoft.com/detail/9n0dx20hk701?hl=en-US&gl=US) or [Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows) directly. With powershell, you would log into the HPC systems the same way as with a Linux terminal.
134102

135-
Windows 11 users have several options. First, the CMD program should contain an ssh client, allowing you to log into the HPC systems the same way as with a Linux terminal.
103+
#### Windows WSL2
136104

137-
### Windows WSL2
138-
139-
If you run Windows 10, you can install WSL, and then install Ubuntu or other Linux distribution (for example, from Microsoft Store). You will have a fully functional Ubuntu with terminal and can connect to cluster using instructions provided above for Linux/Mac users.
140-
141-
Instructions on WSL installation can be found here: [https://docs.microsoft.com/en-us/windows/wsl/install-win10][wsl installation link]
105+
Alternatively, you can install WSL2, and then install Ubuntu or other Linux distribution (for example, from Microsoft Store). You will have a fully functional Ubuntu with terminal and can connect to cluster using instructions provided above for Linux/Mac users. Instructions on WSL installation can be found here: [https://docs.microsoft.com/en-us/windows/wsl/install-win10][wsl installation link]
142106

107+
With [Windowns Terminal](https://apps.microsoft.com/detail/9n0dx20hk701?hl=en-US&gl=US), you can access both the Linux WSL2 shell and the Windows Powershell from the same application.
108+
143109
:::tip
144-
- One of many options to get terminal that support tabs, etc. is to install 'Windows Terminal' from Microsoft Store.
145-
- If you are using WSL 2 (Windows subsystem for Linux), you may not be able to access internet when Cisco AnyConnect VPN, installed from exe file, is activated. A potential solution: uninstall Cisco AnyConnect and install AnyConnect using Microsoft Store, and then setup new VPN connection using settings described on [IT webpage][install vpn on windows link].
110+
- If you are using WSL 2 (Windows subsystem for Linux 2), you may not be able to access internet when Cisco AnyConnect VPN, installed from exe file, is activated. A potential solution: uninstall Cisco AnyConnect and install AnyConnect using Microsoft Store, and then setup new VPN connection using settings described on [IT webpage][install vpn on windows link].
146111
:::
147112

148113
## Additional Tips
@@ -164,30 +129,7 @@ Instead of typing your password every time you need to log in, you can also spec
164129

165130
For additional recommendations on how to configure your SSH sessions, see the [ssh configuring and x11 forwarding page](./02_ssh_tunneling_and_x11_forwarding.md).
166131

167-
### PuTTY (Only for Windows)
168-
169-
There are many SSH clients for Windows OS, but we recommend using [PuTTY SSH][putty link] if you have not already. Once it is installed, launch PuTTY and configure new session "Session" category as in the screenshot below:
170-
171-
![putty configuration image](./static/putty_config.png)
172-
173-
Here we are instructing PuTTY to connect to host gw.hpc.nyu.edu on port 22 using SSH protocol (note, that this interface allows you to save this connection configuration for future). Just like for Linux and Mac users, if you are connecting from the outside of NYU network, you need to go through the gateway servers.
174-
175-
Once you click "Open", a terminal window with prompt for password will pop up. Enter your NetID password and you should be authorized on the gateway server. Gateways are designed to support only a very minimal set of commands and their only purpose it to let users access HPC systems. Once you are there type in an ssh command that will let you connect to Greene cluster :
176-
177-
```sh
178-
# Gateway Login
179-
ssh gw.hpc.nyu.edu
180-
```
181-
182-
A new command line interface window will open up that prompts you for your password on the gateway server, from there you can connect to Greene by entering the following:
183-
184-
```sh
185-
ssh greene.hpc.nyu.edu
186-
```
187-
188-
189132

190-
[putty link]: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
191133

192134
[nyu vpn link]: https://www.nyu.edu/life/information-technology/infrastructure/network-services/vpn.html
193135

docs/hpc/02_connecting_to_hpc/02_ssh_tunneling_and_x11_forwarding.md

Lines changed: 1 addition & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,6 @@ Linux users have X set up already. Mac users can download and install [XQuartz][
1313
To avoid repeatedly setting up a tunnel, you can write the details of the tunnel into your SSH configuration file. Using your favorite editor, open the file `~/.ssh/config` and place the following lines in it:
1414

1515
```sh
16-
# first we create the tunnel, with instructions to pass incoming
17-
# packets on ports 8027 and 8028 through it and to specific locations
18-
19-
Host hpcgwtunnel
20-
HostName gw.hpc.nyu.edu
21-
ForwardX11 no
22-
StrictHostKeyChecking no
23-
LocalForward 8027 greene.hpc.nyu.edu:22
24-
UserKnownHostsFile /dev/null
25-
User <Your NetID>
26-
27-
# next we create an alias for incoming packets on the port
28-
# The alias corresponds to where the tunnel forwards these packets
29-
3016
Host greene
3117
HostName localhost
3218
Port 8027
@@ -52,80 +38,6 @@ chmod 700 $HOME/.ssh
5238
chmod 600 ~/.ssh/*
5339
```
5440

55-
### Start the tunnel
56-
57-
To create the tunnel, ssh to it with the following command:
58-
```sh
59-
ssh hpcgwtunnel
60-
```
61-
62-
:::tip
63-
64-
You must leave this window open for the tunnel to remain open. It is best to start a new terminal window for subsequent logins.
65-
66-
:::
67-
68-
### Log in via the tunnel
69-
70-
Open a new terminal window and use ssh to log in to the cluster, as shown below.
71-
72-
```sh
73-
ssh greene
74-
```
75-
76-
Note that you must use the short name defined above in your .ssh/config file, not the fully qualified domain name:
77-
78-
**Creating a once-off tunnel.**
79-
80-
Alternatively, you can set up a once-off tunnel without editing .ssh/config by running the following command:
81-
82-
```sh
83-
ssh -L 8027:greene:22 NetID@gw.hpc.nyu.edu # to set up a tunnel
84-
ssh -Y -p 8027 NetID@localhost
85-
```
86-
87-
This is the equivalent to running "ssh hpcgwtunnel" in the reusable tunnel instructions, but the port forwarding is specified on the command line.
88-
89-
90-
## Tunneling (Windows)
91-
92-
### Creating the tunnel
93-
94-
1. First open Putty and prepare to log in to gw.hpc.nyu.edu. If you saved your session during that process, you can load it by selecting from the "Saved Sessions" box and hitting "Load". Don't hit "Open" yet!
95-
96-
2. Under "Connection" -> "SSH", just below "X11", select "Tunnels
97-
98-
3. Write "8026" (the port number) in the "Source port" box, and "greene.hpc.nyu.edu:22" (the machine you wish to tunnel to - 22 is the port that ssh listens on) in the "Destination" box
99-
100-
4. Click "Add". You can repeat step 3 with a different port number and a different destination. If you do this you will create multiple tunnels, one to each destination
101-
102-
5. Before hitting "Open", go back to the "Sessions" page, give the session a name ("hpcgw_tunnel") and hit "Save". Then next time you need not do all this again, just load the saved session
103-
104-
6. Hit "Open" to login in to gw.hpc.nyu.edu and create the tunnel. A terminal window will appear, asking for your login name (NYU NetID) and password (NYU password). Windows may also ask you to allow certain connections through its firewall - this is so you can ssh to port 8026 on your workstation - the entrance to the tunnel
105-
106-
107-
:::note
108-
You can add other NYU hosts to the tunnel by adding a new source port and destination and clicking "Add". For example, you could add "Source port = 8025" and "Destination = EXAMPLE.hpc.nyu.edu:22", then press "Add". You would then perform Step 2 (below) twice - once for greene on port 8026 and once for an example server on port 8025.
109-
:::
110-
111-
Using your SSH tunnel: To log in via the tunnel, first the tunnel must be open. If you've just completed Step 1, it will be open and you can jump down to "Step 2: Logging in via your SSH tunnel". If you completed Step 1 yesterday, and now want to re-use the tunnel you created, first start the tunnel:
112-
113-
Starting the tunnel: During a session, you need only do this once - as long as the tunnel is open, new connections will go over it.
114-
115-
1. Start Putty.exe (again, if necessary), and load the session you saved in settings during procedure above
116-
117-
2. Hit "Open", and log in to the bastion host with your NYU NetID and password. This will create the tunnel.
118-
119-
### Logging in via your SSH tunnel
120-
121-
1. Start the second Putty.exe. In the "Host Name" box, write "localhost" and in the "Port" box, write "8026" (or whichever port number you specified when you set up the tunnel in the procedure above). We use "localhost" because the entrance of the tunnel is actually on this workstation, at port 8026
122-
123-
2. Go to "Connections" -> "SSH" -> "X11" and check "Enable X11 forwarding"
124-
125-
3. Optionally, give this session a name (in "Saved Sessions") and hit "Save" to save it. Then next time instead of steps 1 and 2 you can simply load this saved session
126-
127-
4. Hit "Open". You will again get a terminal window asking for your login (NYU NetID) and password (NYU password). You are now logged in to the HPC cluster!
128-
12941
## X11 Forwarding
13042

13143
In rare cases when you need to interact with GUI applications on HPC clusters, you need to enable X11 forwarding for your SSH connection. Mac and Linux users will need to run the ssh commands described above with an additional flag:
@@ -136,7 +48,5 @@ ssh -Y <NYU_NetID>@greene.hpc.nyu.edu
13648

13749
However, Mac users need to install [XQuartz][xquartz], since X-server is no longer shipped with the macOS.
13850

139-
Windows users will also need to install X server software. We recommend two options out there. We recommend installing Xming. Start Xming application and configure PuTTY to support X11 forwarding:
140-
141-
51+
Windows users will also need to install X server software. We recommend using MobaXTerm. Further instructions are provided in the [introductory HPC tutorial](../12_tutorial_intro_shell_hpc/02_connecting_to_hpc.mdx).
14252

-417 KB
Binary file not shown.

docs/hpc/03_storage/08_transferring_cloud_storage_data_with_rclone.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ There are specific instruction on the [rclone web site](https://rclone.org/drive
2929

3030
### Step 1: Login to Greene:
3131

32-
Follow [instructions](../02_connecting_to_hpc/01_connecting_to_hpc.mdx) to log into the Greene HPC cluster.
32+
Follow [instructions](../02_connecting_to_hpc/01_connecting_to_hpc.md) to log into the Greene HPC cluster.
3333

3434
### Step 2: Load the rclone module
3535
```sh

docs/hpc/08_ml_ai_hpc/03_run_hf_model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Here we provide an example of how one can run a Hugging Face Large-language mode
55
## Prepare environment
66
### Create project directory
77

8-
After [logging on to a Greene login node](../02_connecting_to_hpc/01_connecting_to_hpc.mdx), make a directory for this project:
8+
After [logging on to a Greene login node](../02_connecting_to_hpc/01_connecting_to_hpc.md), make a directory for this project:
99
```bash
1010
[NetID@log-1 ~]$ mkdir -p /scratch/NetID/llm_example
1111
[NetID@log-1 ~]$ cd /scratch/NetID/llm_example

docs/hpc/09_ood/01_ood_intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ Just click on the `Session ID` link and a tab will open with the contents of the
6363

6464
#### From terminal
6565

66-
If your session is no longer visible from within OOD you may still be able to find your logs via the terminal. Simply [log into Greene](../02_connecting_to_hpc/01_connecting_to_hpc.mdx) and `cd` to `/home/$USER/ondemand/data/sys/dashboard/batch_connect/sys/` and then `cd` into the directory for the app that you're interested in. You should find the file `output.log` there.
66+
If your session is no longer visible from within OOD you may still be able to find your logs via the terminal. Simply [log into Greene](../02_connecting_to_hpc/01_connecting_to_hpc.md) and `cd` to `/home/$USER/ondemand/data/sys/dashboard/batch_connect/sys/` and then `cd` into the directory for the app that you're interested in. You should find the file `output.log` there.

docs/hpc/09_ood/07_jupyter_with_conda_singularity.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This page describes how to use your Singularity with conda environment in OOD GUI at Greene.
55

66
### Log Into Greene via the Terminal
7-
The following commands must be run from the terminal. Information on accessing via the terminal can be found at [Connecting to the HPC](../02_connecting_to_hpc/01_connecting_to_hpc.mdx) or you can log into OOD and select the `Clusters` tab at the top of the page and select `Greene Shell Access`.
7+
The following commands must be run from the terminal. Information on accessing via the terminal can be found at [Connecting to the HPC](../02_connecting_to_hpc/01_connecting_to_hpc.md) or you can log into OOD and select the `Clusters` tab at the top of the page and select `Greene Shell Access`.
88

99
### Preinstallation Warning
1010
:::warning

0 commit comments

Comments
 (0)