getKeyFile error: ssh: no key found
rlintott opened this issue · 2 comments
rlintott commented
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 commented
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 commented
got similar error:
getKeyFile error: open /root/.ssh/id_rsa: permission denied
worked for years now, suddenly this error occurs