| 82 | |
| 83 | |
| 84 | === Client Security Info |
| 85 | ==== Allowed Key Types and security |
| 86 | SSH authentication has been configured following the security guidelines from [https://infosec.mozilla.org/guidelines/openssh.html#modern-openssh-67 Mozilla OpenSSH 6.7+] |
| 87 | |
| 88 | Weak key types, algorithms, ciphers, and MACs are denied. |
| 89 | |
| 90 | Specifically, the following types are allowed: |
| 91 | - rsa with key length >= 2048 |
| 92 | - ecdsa |
| 93 | - ed25519 |
| 94 | |
| 95 | Any modern key should work, but if you have a very old key, it may be of an old type, or of insufficient length. |
| 96 | |
| 97 | ==== Key Generation |
| 98 | ===== Passphrase |
| 99 | Most importantly, set a passphrase. Usage of this key both allows access, and identifies the user as you. If your key is lost or stolen, you may be responsible for actions taken. |
| 100 | |
| 101 | ===== Key types |
| 102 | We recommend ed25519 keys, mostly due to ease of use, as they can be both secure and quite short. |
| 103 | |
| 104 | Using OpenSSH >= 6.7: `ssh-keygen -a 100 -t ed25519` |
| 105 | |
| 106 | ==== Key Installation |
| 107 | |
| 108 | ===== Linux |
| 109 | The easiest way is to create a `~/.ssh/config` file, that looks like the following: |
| 110 | {{{ |
| 111 | Host *.cosmos-lab.org |
| 112 | User USERNAME |
| 113 | IdentityFile ~/.ssh/id_ed25519 |
| 114 | IdentitiesOnly yes |
| 115 | }}} |
| 116 | |
| 117 | Customize to your needs. |
| 118 | - Host specifies that this will be applied for anything in the cosmos-lab.org domain |
| 119 | - User is the username to use |
| 120 | - !IdentityFile specifies the path to the private key to use. It must have permissions 600. |
| 121 | - !IdentitiesOnly tells the client to only use the key specified. Our servers will deny access if too many different keys are attempted in one connection. |
| 122 | |
| 123 | For convenience, you can use ssh-agent to automatically unlock and apply your key configuration based on your desktop login session. This may be done automatically on some distros, such as Ubuntu 18.04 Desktop |
| 124 | |
| 125 | ===== MacOS |
| 126 | You can follow the same steps as for linux, if using the built-in ssh client and terminal emulators. |
| 127 | |
| 128 | You can configure your keyring to unlock your ssh keys, so again, please use keys with passphrases. |
| 129 | |
| 130 | ===== Windows |
| 131 | |
| 132 | Common ssh clients for Windows: |
| 133 | - [https://docs.microsoft.com/en-us/windows/wsl/install-win10 WSL on Windows 10]: follow the steps for linux. |
| 134 | - [https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty] Very widely used. |
| 135 | - [https://mobaxterm.mobatek.net/ MobaXterm] Has tabs, and a convenient Xserver for graphical forwards. |
| 136 | - [https://www.bitvise.com/ssh-client-download Bitvise] Has easy to use port forwarding config |
| 137 | |
| 138 | For all of these, please make sure to generate or export your public key in "OpenSSH" format, as it will be applied on a Linux server. |
| 139 | |
| 140 | ==== Removing or changing keys |
| 141 | Once logged in, your allowed public keys are listed in the file `~/.ssh/authorized_keys` |
| 142 | |
| 143 | The profile management page on the website reflects this file. |
| 144 | |
| 145 | Please do not delete the first key on this list, as this allows moving between cosmos machines, such as console and gateway, but does not affect external access. If missing, it will be re-generated periodically. |
| 146 | |
| 147 | If you remove ALL keys, you must upload a new one via the webUI, as you will have no other way to access the systems. |
| 148 | |