From e2656352010b289468f7915cf802436252090758 Mon Sep 17 00:00:00 2001 From: Wouter Depypere Date: Mon, 17 Feb 2025 12:16:00 +0100 Subject: [PATCH 1/2] remove vnc and x2go in favor of ood --- mkdocs/docs/HPC/VNC.md | 281 +---------------------------- mkdocs/docs/HPC/account.md | 14 -- mkdocs/docs/HPC/troubleshooting.md | 29 --- mkdocs/docs/HPC/x2go.md | 187 +------------------ mkdocs/extra/gent.yml | 8 - 5 files changed, 3 insertions(+), 516 deletions(-) diff --git a/mkdocs/docs/HPC/VNC.md b/mkdocs/docs/HPC/VNC.md index 9bce16bf93d..9eb9ba6e218 100644 --- a/mkdocs/docs/HPC/VNC.md +++ b/mkdocs/docs/HPC/VNC.md @@ -1,282 +1,3 @@ # Graphical applications with VNC -{% if site == gent %} -**VNC is still available at UGent site but we encourage our users to replace VNC by X2Go client**. -Please see [Graphical applications with X2Go](../x2go/#graphical-applications-with-x2go) for more information. -{% endif %} - -Virtual Network Computing is a graphical desktop sharing system that -enables you to interact with graphical software running on the HPC -infrastructure from your own computer. - -**Please carefully follow the instructions below, since the procedure to connect to a VNC server running on the HPC infrastructure is not trivial, due to security constraints.** - -## Starting a VNC server - -First login on the login node (see [First time connection to the HPC infrastructure](../connecting/#first-time-connection-to-the-hpc-infrastructure), then start `vncserver` with: - -``` -$ vncserver -geometry 1920x1080 -localhost -You will require a password to access your desktops. - -Password: -Verify: -Would you like to enter a view-only password (y/n)? n -A view-only password is not used - -New '{{loginhost}}:6 ({{userid}})' desktop is {{loginhost}}:6 - -Creating default startup script {{homedir}}.vnc/xstartup -Creating default config {{homedir}}.vnc/config -Starting applications specified in {{homedir}}.vnc/xstartup -Log file is {{homedir}}.vnc/{{loginhost}}:6.log -``` - -**When prompted for a password, make sure to enter a secure password: if someone can guess your password, they will be able to do anything with your account you can!** - -Note down the details in bold: the hostname (in the example: `{{loginhost}}`) and the -(partial) port number (in the example: `6`). - -It's important to remember that VNC sessions are permanent. They survive -network problems and (unintended) connection loss. This means you can -logout and go home without a problem (like the terminal equivalent -`screen` or `tmux`). This also means you don't have to start `vncserver` -each time you want to connect. - -## List running VNC servers - -You can get a list of running VNC servers on a node with - -``` -$ vncserver -list -TigerVNC server sessions: - -X DISPLAY # PROCESS ID -:6 30713 -``` - -This only displays the running VNC servers on **the login node you run the command on**. - -To see what login nodes you are running a VNC server on, you can run the -`ls .vnc/*.pid` command in your home directory: the files shown have the -hostname of the login node in the filename: - -``` -$ cd $HOME -$ ls .vnc/*.pid -.vnc/{{loginhost}}:6.pid -.vnc/{{altloginhost}}:8.pid -``` - -This shows that there is a VNC server running on `{{loginhost}}` on port 5906 and -another one running `{{altloginhost}}` on port 5908 (see also [Determining the source/destination port](./#determining-the-sourcedestination-port)). - -## Connecting to a VNC server - -The VNC server runs on a (in the example above, on `{{loginhost}}`). - -In order to access your VNC server, you will need to set up an SSH -tunnel from your workstation to this login node (see [Setting up the SSH tunnel(s)](./#setting-up-the-ssh-tunnels)). - -Login nodes are rebooted from time to time. You can check that the VNC -server is still running in the same node by executing `vncserver -list` -(see also -[List running VNC servers](./#list-running-vnc-servers)). If you get an empty list, it means that there is no VNC -server running on the login node. - -**To set up the SSH tunnel required to connect to your VNC server, you will need to port forward the VNC port to your workstation.** - -The *host* is `localhost`, which means "your own computer": we set up an -SSH tunnel that connects the VNC port on the login node to the same port -on your local computer. - -### Determining the source/destination port - -The *destination port* is the port on which the VNC server is running -(on the login node), which is **the sum of `5900` and the partial port number** we noted down earlier (`6`); in the -running example, that is `5906`. - -The *source port* is the port you will be connecting to with your VNC -client on your workstation. Although you can use any (free) port for -this, we strongly recommend to use the **same value as the destination port**. - -So, in our running example, both the source and destination ports are -`5906`. - -### Picking an intermediate port to connect to the right login node - -In general, you have no control over which login node you will be on -when setting up the SSH tunnel from your workstation to `{{loginnode}}` (see [Setting up the SSH tunnel(s)](./#setting-up-the-ssh-tunnels)). - -If the login node you end up on is a different one than the one where -your VNC server is running (i.e., `{{altloginhost}}` rather than `{{loginhost}}` in our running -example), you need to create a ***second* SSH tunnel** on the login node you are connected to, -in order to "patch through" to the correct port on the login node -where your VNC server is running. - -In the remainder of these instructions, we will assume that we are -indeed connected to a different login node. Following these instructions -should always work, even if you happen to be connected to the correct -login node. - -To set up the second SSH tunnel, you need to **pick an (unused) port on the login node you are connected to**, which will be used as an -*intermediate* port. - -Now we have a chicken-egg situation: you need to pick a port before -setting up the SSH tunnel from your workstation to `{{loginhost}}`, but only after -starting the SSH tunnel will you be able to determine whether the port -you picked is actually free or not... - -In practice, if you **pick a *random* number between $10000$ and $30000$**, you have a good chance that the port will not be -used yet. - -We will proceed with $12345$ as intermediate port, but **you should pick another value that other people are not likely to pick**. If you need -some inspiration, run the following command on a Linux server (for -example on a login node): `echo $RANDOM` (but do not use a value lower -than $1025$). - -### Setting up the SSH tunnel(s) - -#### Setting up the first SSH tunnel from your workstation to {{loginnode}} - -First, we will set up the SSH tunnel from our workstation to . - -Use the settings specified in the sections above: - -- *source port*: the port on which the VNC server is running (see [Determining the source/destination port](./#determining-the-sourcedestination-port)); - -- *destination host*: `localhost`; - -- *destination port*: use the intermediate port you picked (see [Picking an intermediate port to connect to the right login node](./#picking-an-intermediate-port-to-connect-to-the-right-login-node)) - -{% if OS == windows %} -See for detailed information on how to configure PuTTY to set up the SSH -tunnel, by entering the settings in the and fields in [SSH tunnel](../running_interactive_jobs/#ssh-tunnel). - -{% else %} -Execute the following command to set up the SSH tunnel. - -``` -ssh -L 5906:localhost:12345 {{userid}}@{{loginnode}} -``` - -**Replace the source port `5906`, destination port `12345` and user ID {{userid}} with your own!** - -{% endif %} - -With this, we have forwarded port `5906` on our workstation to port -`12345` on the login node we are connected to. - -**Again, do *not* use `12345` as destination port, as this port will most likely be used by somebody else already; replace it with a port number you picked yourself, which is unlikely to be used already (see [Picking an intermediate port to connect to the right login node](./#picking-an-intermediate-port-to-connect-to-the-right-login-node)).** - -#### Checking whether the intermediate port is available - -Before continuing, it's good to check whether the intermediate port that -you have picked is actually still available (see [Picking an intermediate port to connect to the right login node](./#picking-an-intermediate-port-to-connect-to-the-right-login-node)). - -You can check using the following command (**do not forget to replace `12345` the value you picked for your intermediate port): - -``` -netstat -an | grep -i listen | grep tcp | grep 12345 -``` - -If you see no matching lines, then the port you picked is still -available, and you can continue. - -If you see one or more matching lines as shown below, -**you must disconnect the first SSH tunnel, pick a different intermediate port, and set up the first SSH tunnel again using the new value**. - -``` -$ netstat -an | grep -i listen | grep tcp | grep 12345 -tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN -tcp6 0 0 :::12345 :::* LISTEN -$ -``` - -#### Setting up the second SSH tunnel to the correct login node - -In the session on the login node you created by setting up an SSH tunnel -from your workstation to `{{loginnode}}`, you now need to set up the second SSH -tunnel to "patch through" to the login node where your VNC server is -running (`{{loginhost}}` in our running example, see [Starting a VNC server](./#starting-a-vnc-server)). - -To do this, run the following command: - -``` -$ ssh -L 12345:localhost:5906 {{loginhost}} -$ hostname -{{loginhost}} -``` - -With this, we are forwarding port `12345` on the login node we are -connected to (which is referred to as `localhost`) through to port -`5906` on our target login node (`{{loginhost}}`). - -Combined with the first SSH tunnel, port `5906` on our workstation is -now connected to port `5906` on the login node where our VNC server is -running (via the intermediate port `12345` on the login node we ended up -one with the first SSH tunnel). - -**Do not forget to change the intermediate port (`12345`), destination port (`5906`), -and hostname of the login node (`{{loginhost}}`) in the command shown above! - -As shown above, you can check again using the `hostname` command whether -you are indeed connected to the right login node. If so, you can go -ahead and connect to your VNC server (see [Connecting using a VNC client](./#connecting-using-a-vnc-client)). - -### Connecting using a VNC client - -{% if OS == windows %} -You can download a free VNC client from -. You can download the -latest version by clicking the top-most folder that has a version number -in it that doesn't also have `beta` in the version. Then download a file -that looks like `TurboVNC64-2.1.2.exe` (the version number can be -different, but the `64` should be in the filename) and execute it. -{% endif %} -{% if OS == macos %} -You can download a free VNC client from -. You can download the -latest version by clicking the top-most folder that has a version number -in it that doesn't also have `beta` in the version. Then download a file -ending in `TurboVNC64-2.1.2.dmg` (the version number can be different) -and execute it. -{% endif %} -{% if OS == linux %} -Download and setup a VNC client. A good choice is -`tigervnc`. You can start it with the `vncviewer` command. -{% endif %} - -Now start your VNC client and connect to `localhost:5906`. **Make sure you replace the port number `5906` with your own destination port (see [Determining the source/destination port](./#determining-the-sourcedestination-port)). - -When prompted for a password, use the password you used to setup the VNC -server. - -When prompted for default or empty panel, choose default. - -If you have an empty panel, you can reset your settings with the -following commands: - -``` -xfce4-panel --quit ; pkill xfconfd -mkdir ~/.oldxfcesettings -mv ~/.config/xfce4 ~/.oldxfcesettings -xfce4-panel -``` - -## Stopping the VNC server - -The VNC server can be killed by running - -``` -vncserver -kill :6 -``` - -where `6` is the port number we noted down earlier. If you forgot, you -can get it with `vncserver -list` (see [List running VNC servers](./#list-running-vnc-servers)). - -## I forgot the password, what now? - -You can reset the password by first stopping the VNC server (see ), then -removing the `.vnc/passwd` file (with `rm .vnc/passwd`) and then -starting the VNC server again (see [Starting a VNC server](./#starting-a-vnc-server)). +We strongly encourage the use of the [web portal](web_portal.md) for graphical use cases. diff --git a/mkdocs/docs/HPC/account.md b/mkdocs/docs/HPC/account.md index c33c829231c..25868358667 100644 --- a/mkdocs/docs/HPC/account.md +++ b/mkdocs/docs/HPC/account.md @@ -143,20 +143,6 @@ Start ***PuTTYgen.exe*** it and follow these steps: buttons ++"Save public key"++ and ++"Save private key"++. We recommend using the name **"id_rsa.pub"** for the public key, and **"id_rsa.ppk"** for the private key. -{%- if site == gent %} -6. Finally, save an "OpenSSH" version of your private key (in - particular for later "X2Go" usage, see [x2go]()) by entering the - "Conversions" menu and selecting "Export OpenSSH key" (do **not** select the - "force new file format" variant). Save the file in the same location - as in the previous step with filename **"id_rsa"**. (If there is no - "Conversions" menu, you must update your "puttygen" version. If you - want to do this conversion afterwards, you can start with loading an - existing "id_rsa.ppk" and only do this conversions export.) - - ![image](img/ch2-puttygen-conversions-export_openssh.png){ style="display: block; margin: 0 auto" } - -{%- endif %} - If you use another program to generate a key pair, please remember that they need to be in the OpenSSH format to access the {{ hpc }} clusters. {% endif %} diff --git a/mkdocs/docs/HPC/troubleshooting.md b/mkdocs/docs/HPC/troubleshooting.md index 08f27434afd..8777a79044d 100644 --- a/mkdocs/docs/HPC/troubleshooting.md +++ b/mkdocs/docs/HPC/troubleshooting.md @@ -352,18 +352,6 @@ If it doesn't (like in the example) or you are in doubt, take a screenshot, pres ![image](img/putty_security_alert.jpg) -{% if site == gent %} -If you use X2Go client, you might get one of the following fingerprints: - -{{xtwogoshaone}} - -**If you get a message "Host key for server changed", do not click "No" until you verified the fingerprint.** - -If the fingerprint matches, click "No", and in the next pop-up screen ("if you accept the new host key..."), press "Yes". - -If it doesn't, or you are in doubt, take a screenshot, press "Yes" and contact {{hpcinfo}}. - -{% endif %} {% endif %} ## DOS/Windows text format @@ -404,28 +392,11 @@ lines: ``` {% endif %} -{% if site == gent %} -{% if OS == macos %} - -If you use X2Go, then you might get another fingerprint, then make sure that the fingerprint -is displayed is one of the following ones: - -{{xtwogoshaone}} - -{% endif %} -{% endif %} - If it does, type ***yes***. If it doesn't, please contact support: {{hpcinfo}}. {% if OS != (linux or macos) %} {% include "../macros/firsttimeconnection.md" %} -{% if site == gent %} -If you use X2Go, then you might get another fingerprint, then make sure that the fingerprint -is displayed is one of the following ones: - -{{xtwogoshaone}} -{% endif %} {% endif %} ## Memory limits diff --git a/mkdocs/docs/HPC/x2go.md b/mkdocs/docs/HPC/x2go.md index eb9af197d15..38dc81701a6 100644 --- a/mkdocs/docs/HPC/x2go.md +++ b/mkdocs/docs/HPC/x2go.md @@ -1,187 +1,4 @@ # Graphical applications with X2Go -X2Go is a graphical desktop software for Linux similar to VNC but with -extra advantages. It does not require to execute a server in the login -node and it is possible to setup a SSH proxy to connect to an specific -login node. It can also be used to access Windows, Linux and macOS -desktops. X2Go provides several advantages such: - -1. A graphical remote desktop that works well over low bandwidth - connections. - -2. Copy/paste support from client to server and vice-versa. - -3. File sharing from client to server. - -4. Support for sound. - -5. Printer sharing from client to server. - -6. The ability to access single applications by specifying the name of - the desired executable like a terminal or an internet browser. - -## Install X2Go client - -X2Go is available for several operating systems. You can download the -latest client from -. - -X2Go requires a valid private SSH key to connect to the login node, this -is described in [How do SSH keys work?](../account/#how-do-ssh-keys-work). This section also describes how to use X2Go client -with a SSH agent. The SSH agent setup is optional but it is the easiest -way to connect to the login nodes using several SSH keys and -applications. Please see [Using an SSH agent (optional)](../account/#using-an-ssh-agent-optional) if you want to know how to setup an SSH agent -in your system. - -## Create a new X2Go session - -After the X2Go client installation just start the client. When you -launch the client for the first time, it will start the new session -dialogue automatically. - -There are two ways to connect to the login node: - -- *Option A*: A direct connection to "***{{loginnode}}***". This is the simpler option, - the system will decide which login node to use based on a - load-balancing algorithm. - -- *Option B*: You can use the node "***{{loginnode}}***" as SSH proxy to connect to a - specific login node. Use this option if you want to resume an old - X2Go session. - -### Option A: direct connection - -This is the easier way to setup X2Go, a direct connection to the login -node. - -![image](img/ch19-x2go-configuration-gent.png) - - -1. Include a session name. This will help you to identify the session - if you have more than one, you can choose any name (in our example - "HPC login node"). - -2. Set the login hostname (In our case: "***{{loginnode}}***") - -3. Set the Login name. In the example is "**{{userid}}**" but you must change it by - your current VSC account. - -4. Set the SSH port (22 by default). - -5. Skip this step if you are using an SSH agent (see [Install X2Go](./#install-x2go-client)). If not add your - SSH private key into "Use RSA/DSA key.." field. In this case: - - 1. Click on the "Use RSA/DSA.." folder icon. This will open a file - browser. - - ![image](img/ch19-x2go-ssh-key.png) -{% if OS == (macos or linux) %} - 2. You should look for your **private** SSH key generated in [Generating a public/private key pair](../account/#generating-a-publicprivate-key-pair). This file has - been stored in the directory "*~/.ssh/*" (by default "**id_rsa**"). -{%- endif %} -{%- if OS == macos %} - ".ssh" is an invisible directory, the Finder will not show it by - default. The easiest way to access the folder, is by pressing ++"cmd"+"shift"+"g"++ , which will allow you to enter the name of a directory, which - you would like to open in Finder. Here, type "/.ssh" and press - enter. Choose that file and click on ++"open"++ . -{% endif %} -{% if OS == windows%} - You should look for your **private** SSH key generated by ++"puttygen"++ exported in "*OpenSSH*" format in [Generating a public/private key pair](../account/#generating-a-publicprivate-key-pair) (by - default "**id_rsa**" (and **not** the ".ppk" version)). Choose that file and click - on ++"open"++ . -{% endif %} - -1. Check "Try autologin" option. - -2. Choose Session type to ++"XFCE"++. Only the ++"XFCE"++ desktop is available for the - moment. It is also possible to choose single applications instead of - a full desktop, like the ++"Terminal"++ or ++"Internet browser"++ (you can change this option later - directly from the X2Go session tab if you want). - - 1. **[optional]:** Set a single application like ++"Terminal"++ instead of ++"XFCE"++ desktop. -{%- if OS == windows %} - This option is - much better than PuTTY because the X2Go client includes - copy-pasting support. -{% endif %} - - ![image](img/ch19-x2go-configuration-xterm.png) - -1. **[optional]:** Change the session icon. - -2. Click the ++"OK"++ button after these changes. - -### Option B: use the login node as SSH proxy - -This option is useful if you want to resume a previous session or if you -want to set explicitly the login node to use. In this case you should -include a few more options. Use the same **Option A** setup but with these changes: - -![image](img/ch19-x2go-configuration-gent-proxy.png) - -1. Include a session name. This will help you to identify the session - if you have more than one (in our example "HPC UGent proxy login"). - -2. Set the login hostname. This is the login node that you want to use - at the end (In our case: "***{{loginhost}}***") - -3. Set "Use Proxy server.." to enable the proxy. Within "Proxy section" - set also these options: - - 1. Set Type "SSH", "Same login", "Same Password" and "SSH agent" - options. - - 2. Set Host to "***{{loginnode}}***" within "Proxy Server" section as well. - - 3. Skip this step if you are using an SSH agent (see [Install X2Go](./#install-x2go-client)). Add your **private** - SSH key within "RSA/DSA key" field within "Proxy Server" as you - did for the server configuration (The "RSA/DSA key" field must - be set in both sections) - - ![image](img/ch19-x2go-proxy-key.png) - - 4. Click the ++"OK"++ button after these changes. - -## Connect to your X2Go session - -Just click on any session that you already have to start/resume any -session. It will take a few seconds to open the session the first time. -It is possible to terminate a session if you logout from the current -open session or if you click on the "shutdown" button from X2Go. If you -want to suspend your session to continue working with it later just -click on the "pause" icon. - -![image](img/ch19-x2go-pause.png) - -X2Go will keep the session open for you (but only if the login node is -not rebooted). - -## Resume a previous session - -If you want to re-connect to the same login node, or resume a previous -session, you should know which login node were used at first place. You -can get this information before logging out from your X2Go session. Just -open a terminal and execute: - -``` -hostname -``` - -![image](img/ch19-x2go-xterm.png) - -This will give you the full login name (like "***{{loginhost}}***" but the hostname in your -situation may be slightly different). You should set the same name to -resume the session the next time. Just add this full hostname into -"login hostname" section in your X2Go session (see [Option B: use the login node as SSH proxy](./#option-b-use-the-login-node-as-ssh-proxy)). - -## Connection failed with X2Go - -If you get the error "**Connection failed** session vscXXYYY-123-4567890123_xyzXFCE_dp32 -terminated" (or similar), It is possible that an old X2Go session -remained on the login node. First, choose a different session type (for -example TERMINAL), then start the X2Go session. A window will pop up, -and you should see that a session is running. Select the session and -terminate it. Then finish the session, choose again XFCE session (or -whatever you use), then you should have your X2Go session. Since we have -multiple login nodes, you might have to repeat these steps multiple -times. +X2Go is being fased out in favor of the [web portal](web_portal.md) which +is superior and easier in use. diff --git a/mkdocs/extra/gent.yml b/mkdocs/extra/gent.yml index a8c56fa5f79..9682dbec8a0 100644 --- a/mkdocs/extra/gent.yml +++ b/mkdocs/extra/gent.yml @@ -31,9 +31,6 @@ modules_last_updated: Sat, 15 Feb 2025 at 15:45:20 CET # This line is automatica # For putty: # ssh-keyscan login.hpc.ugent.be 2>/dev/null | ssh-keygen -l -f - -E md5 | awk '{ print "ssh-" $4 " " $1 " " $2}' | sed -E 's/\(([^()]*)\)/\1/' | sed 's/MD5://g' | tr '[:upper:]' '[:lower:]' | sed 's/ed25519 256/ed25519 255/g' -# For X2Go: -# for x in /etc/ssh/*.pub ; do echo $x && cut -d' ' -f2 < $x | base64 -d | openssl sha1 -c ; done ; - opensshFirstConnect: | RSA key fingerprint is 10:2f:31:21:04:75:cb:ed:67:e0:d5:0c:a1:5a:f4:78 @@ -51,11 +48,6 @@ puttyFirstConnect: | - ssh-ecdsa 256 e6:d2:9c:d8:e7:59:45:03:4a:1f:dc:96:62:29:9c:5f - ssh-ecdsa 256 SHA256:C8TVx0w8UjGgCQfCmEUaOPxJGNMqv2PXLyBNODe5eOQ -xtwogoshaone: | - - ssh-rsa 2048 53:25:8c:1e:72:8b:ce:87:3e:54:12:44:a7:13:1a:89:e4:15:b6:8e - - ssh-ed25519 255 e3:cc:07:64:78:80:28:ec:b8:a8:8f:49:44:d1:1e:dc:cc:0b:c5:6b - - ssh-ecdsa 256 67:6c:af:23:cc:a1:72:09:f5:45:f1:60:08:e8:98:ca:31:87:58:6c - lmod_error: | Lmod has detected the following error: A different version of the 'GCC' module is already loaded (see output of 'ml'). From 2a4eda2e2048db83ce8d932803d996f6a24340b5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 17 Feb 2025 13:41:03 +0100 Subject: [PATCH 2/2] fix typo: fased -> phased --- mkdocs/docs/HPC/x2go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs/docs/HPC/x2go.md b/mkdocs/docs/HPC/x2go.md index 38dc81701a6..30169a91723 100644 --- a/mkdocs/docs/HPC/x2go.md +++ b/mkdocs/docs/HPC/x2go.md @@ -1,4 +1,4 @@ # Graphical applications with X2Go -X2Go is being fased out in favor of the [web portal](web_portal.md) which +X2Go is being phased out in favor of the [web portal](web_portal.md) which is superior and easier in use.