<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>KubeOpsDoku – ssh-keygen</title>
    <link>https://kubeops.net/docs/tags/ssh-keygen/</link>
    <description>Recent content in ssh-keygen on KubeOpsDoku</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="https://kubeops.net/docs/tags/ssh-keygen/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Kubeopsctl: How to set up SSH keys</title>
      <link>https://kubeops.net/docs/kubeopsctl/how-to-guide/how-to-set-up-ssh-keys/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://kubeops.net/docs/kubeopsctl/how-to-guide/how-to-set-up-ssh-keys/</guid>
      <description>
        
        
        &lt;p&gt;To securely access the kubeops master and worker machines, you need to create a ssh-key-pair (private and public key) on the admin machine. Afterwards copy the public key onto each machine.&lt;/p&gt;
&lt;h2 id=&#34;install-ssh-client&#34;&gt;Install SSH Client&lt;/h2&gt;
&lt;p&gt;Most Linux distributions come with an SSH client pre-installed. If its not installed, you can install it using your distributions package manager.&lt;/p&gt;
&lt;div class=&#34;alert alert-danger important callout&#34;
     role=&#34;alert&#34;&gt;
  &lt;strong&gt;Important&lt;/strong&gt;
  
  For installing new additional software you may need permissions (e.g. &lt;code&gt;root&lt;/code&gt; or &lt;code&gt;sudo&lt;/code&gt;).
  
&lt;/div&gt;
&lt;p&gt;For &lt;strong&gt;RHEL8&lt;/strong&gt; OS use following command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo dnf install -y openssh-client
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;generate-ssh-keys&#34;&gt;Generate SSH Keys&lt;/h2&gt;
&lt;p&gt;If you do not already have an SSH key or if you want to generate a new key pair specifically for this connection, follow these steps.&lt;/p&gt;
&lt;p&gt;Run the command&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-keygen
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Follow the prompts to choose a file location and passphrase (optional but recommended for added security).&lt;/p&gt;
&lt;h2 id=&#34;copy-the-public-key-to-the-remote-machine&#34;&gt;Copy the Public Key to the Remote Machine&lt;/h2&gt;
&lt;p&gt;To avoid password prompts every time you connect, you can authorize your public key on the remote machine.&lt;/p&gt;
&lt;p&gt;You can manually copy the public key to the servers authorized keys using the command &lt;code&gt;ssh-copy-id&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh-copy-id &amp;lt;username&amp;gt;@&amp;lt;remote_host&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replace &lt;code&gt;&amp;lt;username&amp;gt;@&amp;lt;remote_host&amp;gt;&lt;/code&gt; with your actual username and the remote machine‘s IP address or hostname.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;ssh-copy-id&lt;/code&gt; is not available, you can use the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cat ~/.ssh/id_rsa.pub &lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;|&lt;/span&gt; ssh username@remote_host &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;mkdir -p ~/.ssh &amp;amp;&amp;amp; cat &amp;gt;&amp;gt; ~/.ssh/authorized_keys&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;additional-information&#34;&gt;Additional Information&lt;/h2&gt;
&lt;p&gt;For more information about commands see the documentation of your respective operating system.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;ssh&lt;/code&gt; or &lt;code&gt;ssh-keygen&lt;/code&gt; you can use the manual pages:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;man ssh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;man ssh-keygen
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
      </description>
    </item>
    
  </channel>
</rss>
