-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Quarto GHA Workflow Runner
committed
Jul 25, 2024
1 parent
6cbfb18
commit 34be33b
Showing
6 changed files
with
39 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
694cd42f | ||
111dc163 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,14 +325,15 @@ <h1 class="title"><span class="chapter-number">2</span> <span class="chapt | |
</tr> | ||
</tbody> | ||
</table> | ||
<p><strong>N.B.</strong> You have to replace these values by the ones provided by the administrator.</p> | ||
<section id="ssh-connection" class="level2 page-columns page-full" data-number="2.1"> | ||
<h2 data-number="2.1" class="anchored" data-anchor-id="ssh-connection"><span class="header-section-number">2.1</span> SSH connection</h2> | ||
<p>To open an SSH connection, you need to launch a terminal (all modern terminals include an SSH client<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a>):</p> | ||
<div class="no-row-height column-margin column-container"><div id="fn1"><p><sup>1</sup> On Windows, you don’t need anymore to install Putty.</p></div></div><ul> | ||
<div class="no-row-height column-margin column-container"><div id="fn1"><p><sup>1</sup> On Windows, you don’t need to install Putty anymore.</p></div></div><ul> | ||
<li>On Unix-based OS (macOS and GNU/Linux), open the app called <em>Terminal</em></li> | ||
<li>On Windows, open the <a href="https://www.atlassian.com/git/tutorials/git-bash">Git Bash</a> app<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> (installed by default with the <a href="https://git-scm.com/">git</a> software)</li> | ||
</ul> | ||
<div class="no-row-height column-margin column-container"><div id="fn2"><p><sup>2</sup> Don’t use PowerShell or RStudio terminal. They can be unstable. Git Bash allows you to use GNU/Linux commands on Windows.</p></div></div><div class="sourceCode" id="cb1"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1"></a><span class="co"># SSH connection to Rossinante ----</span></span> | ||
<div class="no-row-height column-margin column-container"><div id="fn2"><p><sup>2</sup> Don’t use PowerShell or RStudio terminal. Git Bash allows you to use GNU/Linux commands on Windows.</p></div></div><div class="sourceCode" id="cb1"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1"></a><span class="co"># SSH connection to Rossinante ----</span></span> | ||
<span id="cb1-2"><a href="#cb1-2"></a><span class="fu">ssh</span> <span class="at">-p</span> 22 [email protected]</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<p>When you first connect to Rossinante (and to any remote server), you will be asked if you trust this server:</p> | ||
<pre><code>The authenticity of host '[92.168.45.3]:22' can't be established. | ||
|
@@ -360,7 +361,7 @@ <h2 data-number="2.2" class="anchored" data-anchor-id="ssh-config-file"><span cl | |
<span id="cb5-4"><a href="#cb5-4"></a><span class="co"># Check if the folder .ssh/ exists ----</span></span> | ||
<span id="cb5-5"><a href="#cb5-5"></a><span class="fu">ls</span> <span class="at">-al</span></span> | ||
<span id="cb5-6"><a href="#cb5-6"></a></span> | ||
<span id="cb5-7"><a href="#cb5-7"></a><span class="co"># Create a new hidden folder (if required) ----</span></span> | ||
<span id="cb5-7"><a href="#cb5-7"></a><span class="co"># Create a new hidden folder (if not already existing) ----</span></span> | ||
<span id="cb5-8"><a href="#cb5-8"></a><span class="fu">mkdir</span> <span class="at">-p</span> ~/.ssh</span> | ||
<span id="cb5-9"><a href="#cb5-9"></a></span> | ||
<span id="cb5-10"><a href="#cb5-10"></a><span class="co"># Change folder permissions ----</span></span> | ||
|
@@ -445,23 +446,23 @@ <h2 data-number="2.4" class="anchored" data-anchor-id="git-credentials"><span cl | |
<section id="github-ssh-keys" class="level2" data-number="2.5"> | ||
<h2 data-number="2.5" class="anchored" data-anchor-id="github-ssh-keys"><span class="header-section-number">2.5</span> GitHub SSH keys</h2> | ||
<p>If you want to communicate with GitHub through the SSH protocol (recommended) you need to generate a new SSH keys pair (different from the one used to connect to Rossinante).</p> | ||
<p>Let’s create a new SSH keys pair using the cryptosystem <code>RSA</code> and a key size of <code>4096</code> bits. But this time, this SSH keys pair will be generated <strong>on Rossinante</strong>.</p> | ||
<p>Let’s create a new SSH keys pair using the cryptosystem <code>ed25519</code>. But this time, this SSH keys pair will be generated <strong>on Rossinante</strong>.</p> | ||
<div class="sourceCode" id="cb17"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1"></a><span class="co"># Create a new SSH key pair (on Rossinante) ----</span></span> | ||
<span id="cb17-2"><a href="#cb17-2"></a><span class="fu">ssh-keygen</span> <span class="at">-f</span> ~/.ssh/id_rsa <span class="at">-t</span> rsa <span class="at">-b</span> 4096 <span class="at">-C</span> <span class="st">"[email protected]"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<span id="cb17-2"><a href="#cb17-2"></a><span class="fu">ssh-keygen</span> <span class="at">-f</span> ~/.ssh/id_ed25519 <span class="at">-t</span> ed25519 <span class="at">-C</span> <span class="st">"[email protected]"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<p>This new SSH keys pair has been stored in <code>~/.ssh/</code>.</p> | ||
<div class="sourceCode" id="cb18"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1"></a><span class="co"># Content of the ~/.ssh folder ----</span></span> | ||
<span id="cb18-2"><a href="#cb18-2"></a><span class="fu">ls</span> ~/.ssh</span> | ||
<span id="cb18-3"><a href="#cb18-3"></a><span class="co">## authorized_keys id_rsa id_rsa.pub</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<span id="cb18-3"><a href="#cb18-3"></a><span class="co">## authorized_keys id_ed25519 id_ed25519.pub</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<p>Let’s restrict the access to the private key.</p> | ||
<div class="sourceCode" id="cb19"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1"></a><span class="co"># Change private key permissions ----</span></span> | ||
<span id="cb19-2"><a href="#cb19-2"></a><span class="co"># (only jdoe can only read this file)</span></span> | ||
<span id="cb19-3"><a href="#cb19-3"></a><span class="fu">chmod</span> 400 ~/.ssh/id_rsa</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<span id="cb19-3"><a href="#cb19-3"></a><span class="fu">chmod</span> 400 ~/.ssh/id_ed25519</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<p>Now we need to store the public key on GitHub server. Visit <a href="https://github.com/settings/keys">https://github.com/settings/keys</a> and click on <strong>New SSH key</strong>.</p> | ||
<p>On Rossinante, print the <strong>public</strong> SSH key:</p> | ||
<div class="sourceCode" id="cb20"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb20-1"><a href="#cb20-1"></a><span class="co"># Print the public SSH key ----</span></span> | ||
<span id="cb20-2"><a href="#cb20-2"></a><span class="fu">cat</span> ~/.ssh/id_rsa.pub</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<span id="cb20-2"><a href="#cb20-2"></a><span class="fu">cat</span> ~/.ssh/id_ed25519.pub</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
<p>Copy the content of the public key and go back to GitHub. Give a title to your new SSH key (for example <em>Rossinante key</em>) and paste your public SSH key. Click on <strong>Add SSH key</strong>.</p> | ||
<p>Congratulation! You can know communicate with GitHub using the SSH protocol from Rossinante. Let’s test the SSH connection between Rossinante and GitHub:</p> | ||
<p><strong>Congratulations!</strong> You can know communicate with GitHub using the SSH protocol from Rossinante. Let’s test the SSH connection between Rossinante and GitHub:</p> | ||
<div class="sourceCode" id="cb21"><pre class="sourceCode numberSource bash number-lines code-with-copy"><code class="sourceCode bash"><span id="cb21-1"><a href="#cb21-1"></a><span class="co"># Test SSH connection between Rossinante and GitHub ----</span></span> | ||
<span id="cb21-2"><a href="#cb21-2"></a><span class="fu">ssh</span> <span class="at">-T</span> [email protected]</span> | ||
<span id="cb21-3"><a href="#cb21-3"></a><span class="co">## Hi janedoe! You've successfully authenticated!, but GitHub does not provide shell access.</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.