Github action to connect via SSH

I try to use github actions (appleboy/ssh-action) to connect via SSH to a Linode of mine.
This is how the workflow file looks like.

name: Connect to Linode

on:
  push:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      - name: ls of linode container
        uses: appleboy/[email protected]
        with:
          host: ${{ secrets.LINODE_HOST }}
          username: ${{ secrets.LINODE_USERNAME }}
          key: ${{ secrets.LINODE_SSHKEY }}
          port: ${{ secrets.LINODE_PORT }}
          script: |
            ls -l

The key contains the private key of the key-pair I'm using to connect manually via command line.
As port I use 22, hope this is correct.

It does not work. I'm getting the following error.

ssh: handshake failed: ssh: unable to authenticate

What am I doing wrong?
Is there a better github action to use?

Thanks already!

1 Reply

Did you give GitHub the public key?

See here:

https://virtualzero.net/blog/how-to-add-an-ssh-public-key-to-github-from-Ubuntu-18.04-lts

You can skip down to step 7.

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct