title: Github action to SSH into my ec2 instance and deploy code
body: <p>I'm a bit confused.
  I'm trying to use a github action to SSH into my ec2 instance and do a deploy. I have the key (from ec2 console) saved as a secret in github as such:</p>
  <pre><code>    - name: Install SSH key
        uses: shimataro/ssh-key-action@v2
        with:
          key: ${{ secrets.COBOTSSH }}
          name: id_rsa
          known_hosts: ${{ secrets.KNOWN_HOSTS }}
      - name: ssh
        run: ssh ${{ secrets.USERNAME }}@${{ secrets.KNOWN_HOSTS }}
  </code></pre>
  <p>Unfortunately I get:
  <code>Host key verification failed.</code></p>
  <p>I've tried multiple SSH github action solutions, so I assume this is user error (shimataro is the gold standard). So i'm gonna be really specific as to what I did:</p>
  <ol>
  <li>Went to keypairs</li>
  <li>Created a new keypair and downloaded the pem file</li>
  <li>Copied the entire text of the pem file into the secret COBOTSSH</li>
  <li>Copied the DNS name of the EC2 instance into KNOWN_HOSTS (contrary to the variable name, it's just a single DNS entry)</li>
  <li>Logged into the box using SSH on my putty terminal, and created a user called X and then put X into the USERNAME secret.
  I assume this is erroring because it requires a password by default? But the error does not have any verbosity. How do I use the key from the EC2 console and still run commands like  <code>ssh-copy-id</code> ?
  A
  ny line by line example of how to do this would be super appreciated - I am a linux noob.</li>
  </ol>