title: How do i use same ssh key across multiple machines?
body: <p>I've got a private Github repo I want to access from two different Linux machines using the same set of ssh keys</p>
  <p>For the first machine, I followed <a href="https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh" rel="noreferrer">Github's instructions</a> for generating SSH keys, and added the resulting public key to Github. This client works fine.
  i uplaoded both my private and public key in GitHub gists to easily wget it on second client</p>
  <p>In the second machine , I  downloaded the the private and public key to the necessary directory and gave relevant permissions.</p>
  <pre><code>wget -O /root/.ssh/id_rsa.pub URL(RAW)
  wget -O /root/.ssh/id_rsa URL(RAW)
  chmod 700 /root/.ssh
  chmod 600 /root/.ssh/id_rsa
  chmod 600 /root/.ssh/id_rsa.pub
  </code></pre>
  <p>I thought this might be all I had to do, but when I try to connect i get the following error</p>
  <pre><code>root@InstanceIDInHexa:~# ssh -T git@github.com                                 
  
  The authenticity of host 'github.com (xxx.xxx.xxx.xxx)' can't be established.
  RSA key fingerprint is SHA256:RandomStringOfAlphaNumericCharacters.
  Are you sure you want to continue connecting (yes/no)? yes
  Warning: Permanently added 'github.com,xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.
  Load key &quot;/root/.ssh/id_rsa&quot;: invalid format
  git@github.com: Permission denied (publickey).
  root@InstanceIDInHexa:~#
  </code></pre>
  <p>I also checked the content and permissions of all the files and it looks good</p>
  <pre><code>cat /root/.ssh/id_rsa 
  cat /root/.ssh/id_rsa.pub
  stat -c &quot;%a&quot; /root/.ssh
  stat -c &quot;%a&quot; /root/.ssh/id_rsa
  stat -c &quot;%a&quot; /root/.ssh/id_rsa.pub
  </code></pre>
  <p>is there something i am missing here ?</p>