... | ... | @@ -2,5 +2,42 @@ |
|
|
|
|
|
Source information: [Set up a SSH access to the cluster on your local system](https://www.pik-potsdam.de/en/institute/about/it-services/hpc/user-guides/access)
|
|
|
|
|
|
The SSH keys serve as a door/key combination, allowing computers possessing the keys (SSH private key) to log into the server where the door (SSH public key) is placed. You can automate the installation of this "door" by following these steps. Note that while the IT advises using a strong passphrase, in practice, leaving this passphrase empty should be secure as long as you refrain from uploading your private key anywhere.
|
|
|
The SSH keys serve as a door/key combination, allowing computers possessing the keys (SSH private key) to log into the server where the door (SSH public key) is placed. You can automate the installation of this "door" by following these steps.
|
|
|
|
|
|
# How to set up SSH keys on Mac/Linux/Ubuntu
|
|
|
|
|
|
1. Open a command shell
|
|
|
2. Navigate to your home directory if not already there by running the following command: `cd ~`
|
|
|
3. run the command: `ssh-keygen`
|
|
|
4. Press Enter to accept the suggested location '~/.ssh/id_rsa'. We strongly recommend not to change this location!
|
|
|
5. (If you already set up a SSH connection in the past and want to renew - e.g. because you want to change the passphrase: Accept to overwrite the file by entering `y` and pressing Enter.
|
|
|
6. Enter your passphrase twice
|
|
|
7. Upload your public key to the cluster (ssh-copy-id)
|
|
|
8. Run the command `ssh-copy-id yourUsername@ts01.pik-potsdam.de`
|
|
|
9. You should see the start page of the cluster. Congratulations!
|
|
|
10. To exit the cluster, run the command `exit`
|
|
|
|
|
|

|
|
|
|
|
|

|
|
|
|
|
|
# How to access the cluster
|
|
|
|
|
|
- Run the command `ssh [username]@cluster.pik-potsdam.de`
|
|
|
- To simplify logging in by just `ssh cluster`, follow these steps:
|
|
|
1. Open a terminal and navigate to your home directory by `cd ~`
|
|
|
2. Use a text editor to create the ~/.ssh/config file. You can use any text editor you're comfortable with. For example, you can use the nano text editor by running `nano ~/.ssh/config` <br>
|
|
|
This command will open the nano text editor and create a new file named config in the ~/.ssh directory if it doesn't already exist.
|
|
|
3. Copy and paste the following into the config file. Change the pik_username to your username!
|
|
|
|
|
|
```
|
|
|
Host ts01 cluster
|
|
|
# 'ssh cluster' completes to username@cluster.pik-potsdam.de
|
|
|
Hostname %h.pik-potsdam.de
|
|
|
User pik_username
|
|
|
# put key to agent automatically
|
|
|
AddKeysToAgent yes
|
|
|
```
|
|
|
4. Save the changes and exit the text editor. In nano, you can do this by pressing Ctrl + X to exit, then Y to confirm the changes, and Enter to save the file.
|
|
|
|
|
|
 |
|
|
\ No newline at end of file |