blob: b5936b8fe077ef8f6351cd9688d0d05bbdcf6ec0 [file] [log] [blame]
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<section class="guide-wrapper">
<h2>Generating SSH key pair on different operation systems</h2>
<ul>
<h3>Generating SSH key pair on Microsoft Windows</h3>
<p>You can use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY</a> to generate your SSH key. PuTTY is a free open-source terminal emulator that functions much like the Terminal application in Mac OS X in a Windows environment.</p>
<li>Please download PuTTYgen program by using <a href="https://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe">this link</a>.</li>
<li>Open the PuTTYgen program.</li>
<li>For Type of key to generate, select RSA.</li>
<li>Click the Generate button.</li>
<li>Move your mouse in the area below the progress bar. When the progress bar is full, PuTTYgen generates your key pair.</li>
<li>OPTIONAL: Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.</li>
<img src="./../assets/guides/public_key.png" alt="">
<li>You will need PRIVATE KEY to connect to your machine. Warning! You must save the private key.</li>
<li>Click the "Save private key" button to save the private key.</li>
<li>PUBLIC KEY shall be uploaded using Web UI of Dlab.</li>
<li>
<strong>Do not use "Save public key" button for saving public key.</strong>
To save public key in a proper format you have to copy all text from "Public key for pasting into OpenSSH
authorized_keys" field, create new textfile and paste this text in it, then save the file in format file_name.pub
</li>
<br>
<h4>How to convert key.pem to key.ppk</h4>
<li>Open the PuTTYgen program.</li>
<li>Select RSA.</li>
<li>Click the Load button.</li>
<li>Choose your key.pem.</li>
<li>OPTIONAL: Type a passphrase in the Key passphrase field. Type the same passphrase in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.</li>
<li>Click the "Save private key" button to save your private key.</li>
<br>
<br>
<p>You can use Cygwin if you want for SSH key generation. In order to generate key using Cygwin please follow these steps:</p>
<li>Open Cygwin shell.</li>
<li>Enter ls -al ~/.ssh to see if existing SSH keys are present</li>
<li>Enter following command and write appropriate email address:</li>
<div class="code-block">ssh-keygen -t rsa -b 4096 -C "<span class="txt-color-yellow">your_email@example.com</span>"</div>
<li>When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.</li>
<li>At the prompt, type a secure passphrase.</li>
<h3>Generating SSH key pair on MAC OS / Linux</h3>
<li>Open Terminal.</li>
<li>Enter following command and write appropriate email address.</li>
<div class="code-block">ssh-keygen -t rsa -b 4096 -C "<span class="txt-color-yellow">your_email@example.com</span>"</div>
<li>This creates a new ssh key, using the provided email as a label.</li>
<div class="code-block txt-color-green">Generating public/private rsa key pair.</div>
<li>When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.</li>
<div class="code-block txt-color-green">Enter a file in which to save the key (/Users/<span class="txt-color-yellow">you</span>/.ssh/id_rsa): <span class="txt-color-yellow">[Press enter]</span></div>
<li>At the prompt, type a secure passphrase.</li>
<div class="code-block txt-color-green">Enter passphrase (empty for no passphrase): <span class="txt-color-yellow">[Type a passphrase]</span> Enter same passphrase again: <span class="txt-color-yellow">[Type passphrase again]</span></div>
</ul>
</section>