| 99 | [[CollapsibleStart(Windows)]] |
| 100 | ==== Install OpenSSH client on your Computer ==== |
| 101 | These instructions assume that you are using a currently supported version of Windows 10 and Windows 11. If you are using an older version of windows, please follow the instructions on this page: [https://wiki.cosmos-lab.org/wiki/GettingStarted#no3]. |
| 102 | |
| 103 | 1. Go to Settings-->Apps-->Optional Features] in Windows Settings. |
| 104 | |
| 105 | 2. If "OpenSSH Client" is listed under the Installed features, you are all set and can go to the next step. |
| 106 | |
| 107 | 3. If "OpenSSH Client" is not listed under the Installed features, click on the View features button right next to the Add an optional feature text. |
| 108 | |
| 109 | 4. In the Search bar on top of the Add an optional feature, type in "OpenSSH Client", and click on the checkbox next to it, and click next. |
| 110 | |
| 111 | 5. Review details of what will be installed and click Install. |
| 112 | |
| 113 | 6. Wait for it to be installed, you might need to restart your PC according to what it says in Settings. |
| 114 | |
| 115 | ==== Generating keys ==== |
| 116 | 1. Open Powershell in Windows as Admin. |
| 117 | |
| 118 | ''The following steps ensure that your key is saved in the right location'' |
| 119 | |
| 120 | 2. Type in |
| 121 | {{{ |
| 122 | cd C:\Users |
| 123 | }}} |
| 124 | |
| 125 | 3. Type in |
| 126 | {{{ |
| 127 | ls |
| 128 | }}} |
| 129 | to see what is your user name |
| 130 | |
| 131 | 4. Type in |
| 132 | {{{ |
| 133 | cd <your Username> |
| 134 | }}} |
| 135 | |
| 136 | 5. Type in |
| 137 | {{{ |
| 138 | cd .ssh |
| 139 | }}} |
| 140 | (if this folder doesn't exist then create it) |
| 141 | |
| 142 | 6. type in |
| 143 | {{{ |
| 144 | ssh-keygen -t rsa |
| 145 | }}} |
| 146 | You will be prompted for a location to save the keys, and a passphrase for the keys which we highly recommend using. This passphrase does not have to be the same as your ORBIT account password. |
| 147 | {{{ |
| 148 | Generating public/private rsa key pair. |
| 149 | Enter file in which to save the key (...): |
| 150 | Enter passphrase (empty for no passphrase): |
| 151 | Enter same passphrase again: |
| 152 | Your identification has been saved in ... |
| 153 | Your public key has been saved in ... |
| 154 | The key fingerprint is: |
| 155 | SHA256:... |
| 156 | The key's randomart image is: |
| 157 | ... |
| 158 | }}} |
| 159 | |
| 160 | ==== Uploading your public key to your ORBIT account ==== |
| 161 | To upload you public key to your orbit account, do the following: |
| 162 | 1. Go to [https://www.orbit-lab.org/cPanel/controlPanel/start] and sign in with your ORBIT username and password |
| 163 | |
| 164 | 2. Click on "Change My Profile" option in the left side menu |
| 165 | |
| 166 | 3. Click the "Choose File" button next to "Public key file" |
| 167 | |
| 168 | 4. Navigate to where your '''public key file''' is stored (typically C:\Users\your_username\.ssh) |
| 169 | |
| 170 | 5. Select the .pub file corresponding to the key you wish to use for ORBIT access |
| 171 | |
| 172 | 6. Click "Open" |
| 173 | |
| 174 | 7. Click the "Update Profile" button |
| 175 | |
| 176 | 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 ORBIT network. Please do NOT delete this key. |
| 177 | |
| 178 | [[Image(wiki:UserGuide/RemoteAccess/SSH:ControlPanel.jpg, width=700)]] |
| 179 | |
| 180 | ==== Configuring your SSH client ==== |
| 181 | Under normal circumstances, as long as the private key file is located in the C:\Users\your_username\.ssh\ folder, the command line SSH client will use the correct key when connecting. |
| 182 | To test your setup, open Powershell and (replacing ''your_orbit_username'' with your own ORBIT username) type: |
| 183 | {{{ |
| 184 | ssh your_orbit_username@gw.orbit-lab.org |
| 185 | }}} |
| 186 | You should be prompted to enter your key file passphrase and be able to successfully connect. |
| 187 | |
| 188 | Type {{{exit}}} and press the Enter key to end the SSH session. |
| 189 | |
| 190 | [[BR]] |
| 191 | ==== Common issues and how to solve them ==== |
| 192 | * If you receive a message like the following: |
| 193 | {{{ |
| 194 | The authenticity of host 'gw.orbit-lab.org (128.6.192.134)' can't be established. |
| 195 | ECDSA key fingerprint is SHA256:iLKtq2Z8wB3ADJdEyM1CwoU85gOeqIUyB4GOJ2YloQg. |
| 196 | Are you sure you want to continue connecting (yes/no)? |
| 197 | }}} |
| 198 | This is a normal message that occurs when your computer connects via SSH to another that it has never connected to before or if the "fingerprint" of the other machine changed (due to replacement or reconfiguration). Simply type {{{yes}}} and connection will proceed normally. |
| 199 | [[BR]] |
| 200 | * If you receive a message like the following: |
| 201 | {{{ |
| 202 | Permission denied (publickey). |
| 203 | }}} |
| 204 | Try connecting again but manually specifying the location where your private SSH key is stored as in the following example: |
| 205 | {{{ |
| 206 | ssh -i /path/to/your/private_key your_orbit_username@gw.orbit-lab.org |
| 207 | }}} |
| 208 | [[CollapsibleEnd]] |