Skip to content

Commit

Permalink
ssh config update
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnt committed Dec 30, 2024
1 parent f76872c commit baa8fe5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link>https://jpnt.github.io/posts/ssh-config/</link>
<pubDate>Sun, 29 Dec 2024 00:00:00 +0000</pubDate>
<guid>https://jpnt.github.io/posts/ssh-config/</guid>
<description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;The Secure Shell (SSH) protocol is a cryptographic network protocol&#xA;designed for secure communication over an unsecured network. It is&#xA;widely used for remote login and command-line execution, replacing&#xA;older, insecure protocols like Telnet and rsh. This guide will explain&#xA;how to configure SSH, manage keys, and integrate SSH with GitHub Actions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;ssh-daemon-sshd-configuration-file&#34;&gt;SSH Daemon (sshd) Configuration File&lt;/h2&gt;&#xA;&lt;p&gt;The SSH daemon settings can be fully configured through its file located&#xA;at /etc/ssh/sshd_config. Open it with a text editor:&lt;/p&gt;</description>
<description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;The Secure Shell (SSH) protocol is a cryptographic network protocol&#xA;designed for secure communication over an unsecured network. It is&#xA;widely used for remote login and command-line execution, replacing&#xA;older, insecure protocols like Telnet and rsh. This guide will explain&#xA;how to configure SSH, manage keys, and integrate SSH with GitHub Actions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to-use-ssh-keys&#34;&gt;How To Use SSH Keys&lt;/h2&gt;&#xA;&lt;p&gt;SSH key-based authentication is more secure and convenient than passwords.&#xA;The client creates a private key and sends a public key to the server.&lt;/p&gt;</description>
</item>
<item>
<title>Divine Simplicity</title>
Expand Down
2 changes: 1 addition & 1 deletion posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link>https://jpnt.github.io/posts/ssh-config/</link>
<pubDate>Sun, 29 Dec 2024 00:00:00 +0000</pubDate>
<guid>https://jpnt.github.io/posts/ssh-config/</guid>
<description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;The Secure Shell (SSH) protocol is a cryptographic network protocol&#xA;designed for secure communication over an unsecured network. It is&#xA;widely used for remote login and command-line execution, replacing&#xA;older, insecure protocols like Telnet and rsh. This guide will explain&#xA;how to configure SSH, manage keys, and integrate SSH with GitHub Actions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;ssh-daemon-sshd-configuration-file&#34;&gt;SSH Daemon (sshd) Configuration File&lt;/h2&gt;&#xA;&lt;p&gt;The SSH daemon settings can be fully configured through its file located&#xA;at /etc/ssh/sshd_config. Open it with a text editor:&lt;/p&gt;</description>
<description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;The Secure Shell (SSH) protocol is a cryptographic network protocol&#xA;designed for secure communication over an unsecured network. It is&#xA;widely used for remote login and command-line execution, replacing&#xA;older, insecure protocols like Telnet and rsh. This guide will explain&#xA;how to configure SSH, manage keys, and integrate SSH with GitHub Actions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to-use-ssh-keys&#34;&gt;How To Use SSH Keys&lt;/h2&gt;&#xA;&lt;p&gt;SSH key-based authentication is more secure and convenient than passwords.&#xA;The client creates a private key and sends a public key to the server.&lt;/p&gt;</description>
</item>
<item>
<title>Divine Simplicity</title>
Expand Down
26 changes: 13 additions & 13 deletions posts/ssh-config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,7 @@ <h1 id="introduction">Introduction</h1>
widely used for remote login and command-line execution, replacing
older, insecure protocols like Telnet and rsh. This guide will explain
how to configure SSH, manage keys, and integrate SSH with GitHub Actions.</p>
<h2 id="ssh-daemon-sshd-configuration-file">SSH Daemon (sshd) Configuration File</h2>
<p>The SSH daemon settings can be fully configured through its file located
at /etc/ssh/sshd_config. Open it with a text editor:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># vi /etc/ssh/sshd_config</span>
</span></span></code></pre></div><p>Recommended settings:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>PermitRootLogin no
</span></span><span style="display:flex;"><span>PubkeyAuthentication yes
</span></span><span style="display:flex;"><span>AuthorizedKeysFile .ssh/authorized_keys
</span></span><span style="display:flex;"><span>PasswordAuthentication no
</span></span></code></pre></div><p>After modifying the configuration, restart the SSH daemon to apply changes:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># systemctl restart sshd</span>
</span></span></code></pre></div><h2 id="how-to-use-ssh-keys">How To Use SSH Keys</h2>
<h2 id="how-to-use-ssh-keys">How To Use SSH Keys</h2>
<p>SSH key-based authentication is more secure and convenient than passwords.
The client creates a private key and sends a public key to the server.</p>
<ol>
Expand Down Expand Up @@ -117,8 +106,19 @@ <h2 id="ssh-daemon-sshd-configuration-file">SSH Daemon (sshd) Configuration File
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>$ ssh-add ~/.ssh/id_ed25519
</span></span></code></pre></div><p>Verify that the key has been added:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>$ ssh-add -l
</span></span></code></pre></div><h2 id="ssh-daemon-sshd-configuration-file">SSH Daemon (sshd) Configuration File</h2>
<p>The SSH daemon settings can be fully configured through its file located
at /etc/ssh/sshd_config. Open it with a text editor:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># vi /etc/ssh/sshd_config</span>
</span></span></code></pre></div><p>Recommended settings:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>PermitRootLogin no
</span></span><span style="display:flex;"><span>PubkeyAuthentication yes
</span></span><span style="display:flex;"><span>AuthorizedKeysFile .ssh/authorized_keys
</span></span><span style="display:flex;"><span>PasswordAuthentication no
</span></span></code></pre></div><p>After modifying the configuration, restart the SSH daemon to apply changes:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># systemctl restart sshd</span>
</span></span></code></pre></div><h2 id="verify-ssh-connection">Verify SSH Connection</h2>
<p>After setting up your keys, test your connection to the server:</p>
<p>After setting up your keys and configuration, test your connection to the server:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>$ ssh user@server_ip
</span></span></code></pre></div><h2 id="troubleshooting-common-issues">Troubleshooting Common Issues</h2>
<ol>
Expand Down
2 changes: 1 addition & 1 deletion tags/networks/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link>https://jpnt.github.io/posts/ssh-config/</link>
<pubDate>Sun, 29 Dec 2024 00:00:00 +0000</pubDate>
<guid>https://jpnt.github.io/posts/ssh-config/</guid>
<description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;The Secure Shell (SSH) protocol is a cryptographic network protocol&#xA;designed for secure communication over an unsecured network. It is&#xA;widely used for remote login and command-line execution, replacing&#xA;older, insecure protocols like Telnet and rsh. This guide will explain&#xA;how to configure SSH, manage keys, and integrate SSH with GitHub Actions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;ssh-daemon-sshd-configuration-file&#34;&gt;SSH Daemon (sshd) Configuration File&lt;/h2&gt;&#xA;&lt;p&gt;The SSH daemon settings can be fully configured through its file located&#xA;at /etc/ssh/sshd_config. Open it with a text editor:&lt;/p&gt;</description>
<description>&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;The Secure Shell (SSH) protocol is a cryptographic network protocol&#xA;designed for secure communication over an unsecured network. It is&#xA;widely used for remote login and command-line execution, replacing&#xA;older, insecure protocols like Telnet and rsh. This guide will explain&#xA;how to configure SSH, manage keys, and integrate SSH with GitHub Actions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to-use-ssh-keys&#34;&gt;How To Use SSH Keys&lt;/h2&gt;&#xA;&lt;p&gt;SSH key-based authentication is more secure and convenient than passwords.&#xA;The client creates a private key and sends a public key to the server.&lt;/p&gt;</description>
</item>
<item>
<title>Iproute2</title>
Expand Down

0 comments on commit baa8fe5

Please sign in to comment.