Changes between Version 20 and Version 21 of User Guide/Remote Access/SSH


Ignore:
Timestamp:
Apr 5, 2023, 5:08:14 PM (20 months ago)
Author:
jkol
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • User Guide/Remote Access/SSH

    v20 v21  
    107107
    108108[[CollapsibleStart(Windows)]]
     109Select your SSH client:
     110
     111[[CollapsibleStart(PowerShell)]]
     112These instructions assume that you are using the built-in SSH client provided in Windows !PowerShell.
     113
     114==== Generating Keys
     115 1. Open a !PowerShell terminal.
     116
     117 2. Enter the following command at the prompt:
     118{{{#!shell-session
     119ssh-keygen.exe
     120}}}
     121 Follow the prompts to generate your SSH key pair. For security reasons, we recommend entering a passphrase for your key. An example of the output you will see is shown below.
     122{{{#!shell-session
     123PS C:\Users\local_user> ssh-keygen
     124Generating public/private rsa key pair.
     125Enter file in which to save the key (C:\Users\local_user/.ssh/id_rsa):
     126Enter passphrase (empty for no passphrase):
     127Enter same passphrase again:
     128Your identification has been saved in C:\Users\local_user/.ssh/id_rsa.
     129Your public key has been saved in C:\Users\local_user/.ssh/id_rsa.pub.
     130The key fingerprint is:
     131SHA256:/sR9z7I0dW40cKcUabv2yv7VAAkLy+snm4tpt9UW6qg local_user@local-pc
     132The key's randomart image is:
     133+---[RSA 3072]----+
     134|        . .   .. |
     135|       . . o .o. |
     136|        o . oo.o.|
     137|         .   o+o.|
     138|        S   . oo+|
     139|       S . + .o=+|
     140|        + * +.+.=|
     141|      .o.@ . +.=o|
     142|     .Eo*oo  .==+|
     143+----[SHA256]-----+
     144}}}
     145
     146==== Uploading your public key to you COSMOS account
     147 ''NOTE: Internet Explorer is not supported for Control Panel operations (including key upload)''
     148
     149 To upload you public key to your cosmos account, do the following:
     150 1. Go to [https://wiki.cosmos-lab.org/cPanel/accountManagement/adminAuthKeys Profile] and sign in with your COSMOS username and password
     151
     152 2. Click on "Change My Profile" option in the left side menu
     153
     154 3. Click the "Choose File" button next to "Public key file"
     155
     156 4. Navigate to where your '''public key file''' is stored (in the previous example it would be something like C:\Users\local_user\.ssh\id_rsa.pub)
     157
     158 5. Select the public key file you wish to use for COSMOS access
     159
     160 6. Click "Open"
     161
     162 7. Click the "Update Profile" button
     163
     164 As a side note, expect to see a default auto generated public key in the list (ends with @internal1). This is used for SSH access between machines inside the COSMOS network. Please do NOT delete this key.
     165
     166 [[Image(ControlPanel.jpg, width=700)]]
     167
     168[[BR]]
     169==== Configuring your SSH client
     170
     171 Under normal circumstances, as long as the private key file is located in the C:\Users\local_user\.ssh\ folder, the command line SSH client will use the correct key when connecting.
     172
     173 To test your setup, open a !PowerShell terminal and (replacing your_cosmos_username with your own COSMOS username) type:
     174{{{#!shell-session
     175ssh your_cosmos_username@gw.cosmos-lab.org
     176}}}
     177
     178 You should be prompted to enter your key file passphrase and be able to successfully connect.
     179
     180 If necessary, you can also manually specify the path to your private SSH key as follows:
     181{{{#!shell-session
     182ssh -i C:\Users\local_user\.ssh\id_rsa your_cosmos_username@gw.cosmos-lab.org
     183}}}
     184
     185 Type exit and press the Enter key to end the SSH session.
     186
     187[[CollapsibleEnd]]
    109188
    110189[[CollapsibleStart(PuTTY)]]
    111190These instructions assume that you are using [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html PuTTY] as your SSH client.
    112191
    113 ==== Generating keys
     192==== Generating Keys
    114193 In PuTTY, the key generation is handled by a separate program named ''puttygen.exe''. If you installed PuTTY via the installer, there should be an icon for PuTTYgen in your Start menu, otherwise [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html download it from here].
    115194