This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
other:putty_conf [2023/03/14 17:03] jypeter [Creating ssh keys with PuTTYgen] More changes |
other:putty_conf [2023/03/16 16:09] jypeter [Adding more connection profiles] Started moving from ciclad to spirit |
||
---|---|---|---|
Line 75: | Line 75: | ||
* ''Host Name'' => ''obelix'' | * ''Host Name'' => ''obelix'' | ||
* ''Saved Session'' => ''obelix (direct connection)'' | * ''Saved Session'' => ''obelix (direct connection)'' | ||
- | * Example: connecting to [[https://documentations.ipsl.fr/MESO_User/Quick_start.html|ciclad]]: | + | * Example: connecting to [[https://documentations.ipsl.fr/spirit/spirit_clusters/head_nodes.html|spirit]]: |
- | * ''Host Name'' => ''ciclad.ipsl.upmc.fr'' | + | * ''Host Name'' => ''spirit1.ipsl.fr'' |
- | * ''Saved Session'' => ''ciclad'' | + | * You can also use ''spirit2'', ''spiritx1'' or ''spiritx2'' depending on [[https://documentations.ipsl.fr/spirit/spirit_clusters/head_nodes.html|which IPSL server you want to access]] |
- | * do not forget to **specify your ciclad login** in: ''Connection'' => ''Data'' => ''Auto-login username'' | + | * ''Saved Session'' => ''spirit1'' |
- | * you will also need an [[other:putty_conf#using_ssh_keys|ssh key]] if you want to connect to ''ciclad'' !! | + | * do not forget to **specify your IPSL login** in: ''Connection'' => ''Data'' => ''Auto-login username'' |
+ | * you will also need an [[other:putty_conf#using_ssh_keys|ssh key]] if you want to connect to ''spirit'' !! | ||
* Go back to ''Category'' => ''Session'' and **Save** the session | * Go back to ''Category'' => ''Session'' and **Save** the session | ||
Line 115: | Line 116: | ||
* You can now connect to the remote server just by clicking on the desktop shortcut, instead of right-clicking on the ''Pageant'' icon! | * You can now connect to the remote server just by clicking on the desktop shortcut, instead of right-clicking on the ''Pageant'' icon! | ||
- | ===== Using ssh keys ===== | + | ===== Using ssh keys with PuTTY/Pageant ===== |
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | In this section, we will use files that have the same base name, and different extensions. | ||
+ | |||
+ | You should **make sure that you can [[other:win10config#displaying_hidden_folders_and_files_and_the_files_extension|see hidden folders, and files' extensions]]** before you go further! | ||
+ | </WRAP> | ||
Read the [[other:ssh#using_ssh_keys|Using ssh keys]] section if you don't know what //ssh keys// are | Read the [[other:ssh#using_ssh_keys|Using ssh keys]] section if you don't know what //ssh keys// are | ||
<WRAP center round important 80%> | <WRAP center round important 80%> | ||
* **Do not lose** the (existing) ssh keys files you have, or the keys that you will create | * **Do not lose** the (existing) ssh keys files you have, or the keys that you will create | ||
- | * It's a very good idea to **keep a copy of these files** on another computer! | + | * It is recommended to **keep a copy of these files** on another computer! |
* **Do not forget** the passphrase that will be used to unlock the private key | * **Do not forget** the passphrase that will be used to unlock the private key | ||
+ | * If you save the passphrase in a file, **do not** put this file in the same place as the ssh keys | ||
+ | * Read [[other:ssh#some_common_sense_advice|Do not forget your passphrase!]] if you need some advice about passphrases | ||
- | * If you save the passphrase in a file, **do not** put this file in the same place as the ssh keys | + | * The best thing to do is probably to **keep the keys in the standard [[other:ssh#configuration_files|ssh configuration directory]]**! |
- | + | ||
- | * Easiest thing to do is probably to store the key files in an ''ssh'' sub-directory somewhere | + | |
- | * We assume below that they keys are in a sub-directory of your [[other:win10config#the_most_important_folders|local HOME FOLDER]]\\ \\ <some_disk_different_from_c>:\Users\<your_login>\ssh\ | + | |
</WRAP> | </WRAP> | ||
+ | ==== Converting existing ssh keys with PuTTYgen ==== | ||
+ | If you already have a private ssh key generated on another computer (e.g. an ''id_ed25519'' text file), you just have to use ''PuTTYgen'' to **import the existing private key**, and then export it to a //converted// ''id_ed25519.ppk'' file that ''Pageant'' can use | ||
+ | * Move the ''id_ed25519'' key file to the [[other:ssh#configuration_files|Windows ssh configuration directory]] | ||
+ | * => ''C:\Users\your_windows_login\.ssh\id_ed25519'' | ||
- | Launching the ''PuTTY Key Generator'': ''Start'' => ''PuTTY'' => ''PuTTYgen'' | + | * Launch the ''PuTTY Key Generator'': ''Start'' => ''PuTTY'' => ''PuTTYgen'' |
- | ==== Converting existing ssh keys with PuTTYgen ==== | + | * Open the ''Conversions''=>''Import key'' menu\\ {{ :other:putty_21b.png?direct&300 |}} |
- | If you already have a private ssh keys generated on another computer (e.g. an ''id_rsa'' text file), you just have to use ''PuTTYgen'' to **import the existing private key**, and then export it to a //converted// ''.ppk'' file that ''Pageant'' can use | + | * Select the existing ''id_ed25519'' private key file (or another valid private key) and type the passphrase to unlock and import it |
- | * Import the key (and type the passphrase, when asked) with: ''Conversions''=>''Import key''\\ {{ :other:putty_21.png?direct&300 |}} | + | |
- | * Then click on the ''Save private key'' button, and create a ''id_rsa.ppk'' file (or ''any_name_you_want.ppk'')\\ {{ :other:putty_22.png?direct&300 |}} | + | * Click on the ''Save private key'' button, and create an ''id_ed25519.ppk'' file in the [[other:ssh#configuration_files|Windows ssh configuration directory]] |
+ | * => ''C:\Users\your_windows_login\.ssh\id_ed25519.ppk'' | ||
==== Creating ssh keys with PuTTYgen ==== | ==== Creating ssh keys with PuTTYgen ==== | ||
Line 149: | Line 161: | ||
Steps: | Steps: | ||
+ | |||
+ | * Launch the ''PuTTY Key Generator'': ''Start'' => ''PuTTY'' => ''PuTTYgen'' | ||
+ | |||
* Make sure that the selected //Type of key to generate// (at the bottom of the ''PuTTYgen'' window) is ''EdDSA'' (short for //Edwards-curve DSA//), with the default ''255'' bits.\\ This will generate **//ed25519// keys** that are now recommended on the IPSL servers | * Make sure that the selected //Type of key to generate// (at the bottom of the ''PuTTYgen'' window) is ''EdDSA'' (short for //Edwards-curve DSA//), with the default ''255'' bits.\\ This will generate **//ed25519// keys** that are now recommended on the IPSL servers | ||
* {{:other:putty_23b.png?direct&500|}} | * {{:other:putty_23b.png?direct&500|}} | ||
* You could also use ''RSA'' and ''4096'' bits, but ''ed25519'' keys are now recommended on the IPSL servers | * You could also use ''RSA'' and ''4096'' bits, but ''ed25519'' keys are now recommended on the IPSL servers | ||
+ | |||
* Click on the ''Generate'' button and move your mouse to generate some random information | * Click on the ''Generate'' button and move your mouse to generate some random information | ||
+ | |||
* Type your ''Key passphrase'' and confirm it | * Type your ''Key passphrase'' and confirm it | ||
* Read [[other:ssh#some_common_sense_advice|Do not forget your passphrase!]] if you need some advice about passphrases | * Read [[other:ssh#some_common_sense_advice|Do not forget your passphrase!]] if you need some advice about passphrases | ||
+ | |||
* Click on the ''Save private key'' button, and create an ''id_ed25519**.ppk**'' file | * Click on the ''Save private key'' button, and create an ''id_ed25519**.ppk**'' file | ||
* Note: files with a ''.ppk'' extension can only be used by ''PuTTY''/''pageant''. That's why you also need to //export// the private key, as shown below | * Note: files with a ''.ppk'' extension can only be used by ''PuTTY''/''pageant''. That's why you also need to //export// the private key, as shown below | ||
+ | |||
* **Important!** Click ''Conversions''=>''Export OpenSSH Key'' and create an ''id_ed25519'' file (a text file with **no** ''.ppk'' extension) | * **Important!** Click ''Conversions''=>''Export OpenSSH Key'' and create an ''id_ed25519'' file (a text file with **no** ''.ppk'' extension) | ||
* You will not need this file when you use ''PuTTY'', but you may need to use this private key in a standard text format later, on Linux computers/servers | * You will not need this file when you use ''PuTTY'', but you may need to use this private key in a standard text format later, on Linux computers/servers | ||
+ | |||
* Open a text editor and create an ''id_ed25519**.pub**'' file | * Open a text editor and create an ''id_ed25519**.pub**'' file | ||
* Save the content of the ''Public key for pasting into OpenSSH authorized_keys file'' field in the file\\ Something looking like\\ <code>ssh-ed25519 AAAAC3NzaC1lZDI[... lots of characters ...]vwjLNmY eddsa-key-20230310</code> | * Save the content of the ''Public key for pasting into OpenSSH authorized_keys file'' field in the file\\ Something looking like\\ <code>ssh-ed25519 AAAAC3NzaC1lZDI[... lots of characters ...]vwjLNmY eddsa-key-20230310</code> | ||
+ | |||
* Click on the ''Save public key'' button, and create a ''id_ed25519**.pub**'' file | * Click on the ''Save public key'' button, and create a ''id_ed25519**.pub**'' file | ||
* You will need to [[other:ssh#installing_ssh_keys|install the public key]] on all the remote Linux server that you want to connect to using the ssh agent, instead of typing your password | * You will need to [[other:ssh#installing_ssh_keys|install the public key]] on all the remote Linux server that you want to connect to using the ssh agent, instead of typing your password |