| | 109 | Select your SSH client: |
| | 110 | |
| | 111 | [[CollapsibleStart(PowerShell)]] |
| | 112 | These 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 |
| | 119 | ssh-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 |
| | 123 | PS C:\Users\local_user> ssh-keygen |
| | 124 | Generating public/private rsa key pair. |
| | 125 | Enter file in which to save the key (C:\Users\local_user/.ssh/id_rsa): |
| | 126 | Enter passphrase (empty for no passphrase): |
| | 127 | Enter same passphrase again: |
| | 128 | Your identification has been saved in C:\Users\local_user/.ssh/id_rsa. |
| | 129 | Your public key has been saved in C:\Users\local_user/.ssh/id_rsa.pub. |
| | 130 | The key fingerprint is: |
| | 131 | SHA256:/sR9z7I0dW40cKcUabv2yv7VAAkLy+snm4tpt9UW6qg local_user@local-pc |
| | 132 | The 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 |
| | 175 | ssh 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 |
| | 182 | ssh -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]] |