appleboy / ssh-action

GitHub Actions for executing remote ssh commands.
https://github.com/marketplace/actions/ssh-remote-commands
MIT License
4.46k stars 550 forks source link

getKeyFile error: open key.pem: permission denied #312

Open lmilbaum opened 3 months ago

lmilbaum commented 3 months ago

The step in the workflow:

     - name: provisioning test environment
        uses: appleboy/ssh-action@v1.0.3
        with:
          host: ${{ steps.host.outputs.host }}
          username: fedora
          key_path: key.pem
          script: provision.sh

But, the following does work:

    - run: |
          ssh -T -o StrictHostKeyChecking=no -i key.pem fedora@${{ steps.host.outputs.host }} bash -c ls
appleboy commented 3 months ago

@lmilbaum can you help to try appleboy/ssh-action@master version? Or add the source of key.pem file to the secret key.

lmilbaum commented 3 months ago

@lmilbaum can you help to try appleboy/ssh-action@master version? Or add the source of key.pem file to the secret key.

Sorry. I can't because I took another approach which doesn't utilize this action.

debu99 commented 1 month ago

i got same issue you can't set chmod 0600 key.pem