Skip to content

Commit

Permalink
Merge pull request #35 from ucdavis/OmenWild-access.md
Browse files Browse the repository at this point in the history
Update access.md
  • Loading branch information
cbookman authored Jul 2, 2024
2 parents 2322fda + 156b371 commit dc7b10a
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions docs/general/access.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
In order to access your HPC account, you may need to generate an SSH key pair for authorization. You generate a pair of keys: a public key and a private key.
The private key is kept securely on your computer or device.
The public key is uploaded to the servers or systems that you want to access securely via SSH.
In order to access your HPC account, you may need to generate an SSH key pair for authorization. You generate a pair of keys: a public key and a private key. The private key is kept securely on your computer or device. The public key is submitted to HPCCF to grant you access to a cluster.

## How do I generate an SSH key pair?

### Windows Operating System

We recommend MobaXterm as the most straightforward SSH client. You can download its free home edition (Installer Edition) from https://mobaxterm.mobatek.net/
The Mobaxterm Portable Edition is not recommended as it deletes the sessions. Once you install the stable version of MobaXterm, open its terminal and enter this command:
We recommend MobaXterm as the most straightforward SSH client. You can download the free Home Edition (Installer Edition) from [MobaXterm](https://mobaxterm.mobatek.net/). Please download the Installer Edition. The Portable Edition deletes the contents of your home directory by default when it exits, which will remove your freshly generate SSH key. Once you install the stable version of MobaXterm, open its terminal and enter this command:


`ssh-keygen`

This command will create a private key and a public key. Do not share your private key; we recommend giving it a passphrase for security.
To view the .ssh directory and to read the public key, enter these commands:
This command will create a private key and a public key. Do not share your private key; we recommend giving it a passphrase for security. To view the .ssh directory and to read the public key, enter these commands:

```
ls -al ~/.ssh
more ~/.ssh/*.pub
cat ~/.ssh/*.pub
```

### MACOS:
### macOS and Linux:

Use a terminal to create an SSH key pair using the command:

Expand All @@ -30,14 +26,13 @@ To view the .ssh directory and to read the public key, enter these commands:

```
ls -al ~/.ssh
more ~/.ssh/*.pub
cat ~/.ssh/*.pub
```

## X11 Forwarding

Some software has a Graphical User Interface (GUI), and so requires X11 to be enabled.
X11 forwarding allows an application on a remote server (in this case, Franklin) to render its GUI on a local system (your computer).
How this is enabled depends on the operating system the computer you are using to access Franklin is running.
X11 forwarding allows an application on a remote server (in this case, Franklin) to render its GUI on a local system (your computer). How this is enabled depends on the operating system the computer you are using to access Franklin is running.

### Linux

Expand All @@ -51,20 +46,17 @@ $ ssh -Y [USER]@[CLUSTER].hpc.ucdavis.edu
If you are off campus on a slower internet connection, you may get better performance by enabling compression with:

```bash
$ ssh -Y [USER]@[CLUSTER].hpc.ucdavis.edu
$ ssh -Y -C [USER]@[CLUSTER].hpc.ucdavis.edu
```
If you have multiple SSH key pairs, and you want to use a specific private key to connect to the clusters, use the otpion `-i` to specify path to the private key with SSH:-
If you have multiple SSH key pairs, and you want to use a specific private key to connect to the clusters, use the otpion `-i` to specify path to the private key with SSH:

```bash
$ ssh -i /path/to/private/key [USER]@[CLUSTER].hpc.ucdavis.edu
$ ssh -i ~/.ssh/id_hpc [USER]@[CLUSTER].hpc.ucdavis.edu
```
### MacOS
### macOS

MacOS does not come with an X11 implementation out of the box.
You will first need to install the free, open-source [XQuartz](https://www.xquartz.org/) package, after which you can use the same `ssh` flags as described in the [Linux instructions](access.md#linux).
macOS does not come with an X11 implementation out of the box. You will first need to install the free, open-source [XQuartz](https://www.xquartz.org/) package, after which you can use the same `ssh` flags as described in the [Linux instructions](access.md#linux).

### Windows

If you are using our recommend windows SSH client, [MobaXterm](https://mobaxterm.mobatek.net/), X11 forwarding should be enabled by default.
You can confirm this by checking that the `X11-Forwarding` box is ticked under your Franklin session settings.
For off-campus access, you may want to tick the `Compression` box as well.
If you are using our recommend windows SSH client ([MobaXterm](access.md#windows-operating-system)) X11 forwarding should be enabled by default. You can confirm this by checking that the `X11-Forwarding` box is ticked under your Franklin session settings. For off-campus access, you may want to tick the `Compression` box as well.

0 comments on commit dc7b10a

Please sign in to comment.