Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getKeyFile error: ssh: no key found #132

Open
rlintott opened this issue Jan 27, 2022 · 2 comments
Open

getKeyFile error: ssh: no key found #132

rlintott opened this issue Jan 27, 2022 · 2 comments

Comments

@rlintott
Copy link

rlintott commented Jan 27, 2022

I'm using Tekton and trying to scp to a server using the image docker.io/appleboy/drone-scp:latest

  - name: upload-script
    image: docker.io/appleboy/drone-scp:latest #tag: 1.6.1
    script: |

      echo "$(params.SSH_SCRIPT)" > script.sh
      echo "$SSH_PUBLIC_KEY" > ${HOME}/.ssh/id_rsa
      drone-scp --host $(params.HOST) \
        --port $(params.PORT) \
        --username $(params.USERNAME) \
        --key-path "${HOME}/.ssh/id_rsa" \
        --target testing \
        --source script.sh

the ssh key is public. Apparently that might be the issue. Is there a way to connect with a public key? Because the server I want to connect to has the private key
But I am getting this output:

tar all files into /tmp/880393127/dUVpoOUcUS.tar
scp file to server.
2022/01/27 21:05:21 getKeyFile error: ssh: no key found
2022/01/27 21:05:25 error copy file to dest: <ip>, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
drone-scp error:  error copy file to dest:  <ip>, error message: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain

Thanks

@DrBlury
Copy link

DrBlury commented May 4, 2022

It seems to me that i faced the same issue. So bump!
I tried to load the key from an organization secret (not keyfile) - maybe that can help. You can just reply here so I can help troubleshooting.

@siwa-pparzer
Copy link

got similar error:
getKeyFile error: open /root/.ssh/id_rsa: permission denied
worked for years now, suddenly this error occurs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants