-
Notifications
You must be signed in to change notification settings - Fork 32
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
Permission denied (publickey,password) #10
Comments
I think this is due to the way web-deploy is copying the key to the web_deploy.key file. If you copy your private key directly to the remote server and do a file compare (cmp in unix) you'll find the files aren't the same, it's added carriage returns |
did any one found the solution! |
We just had the same problem. This plugin uses node16 base image which apparently is based on old OS docker base image which has pre-7.8 openssh - which needs an old format of the private key. Hopefully this would be fixed by switching to a new runtime, I'm guessing node18 - but who knows if that has a new-enough openssh. |
some problem, i didnt understand if there is a solution |
Same problem... maybe I am doing something wrong, but I see others have the problem too... Did anyone find a solution? Thx |
@peterhalicky Pointed me to the solution. When generating the ssh private key, you have to make it use PEM as the format: |
@EmileBons and @peterhalicky you legends, thank you for sharing your findings! |
I re-created the deploy key using the PEM format: ssh-keygen -m PEM -t rsa -P "" -f ~/id_rsa I created the key on my linux laptop. I can ssh into my server with that key without problems. But with rsync this is not working though: $ rsync -e ssh -p 22 -i ~/.ssh/deploy_key -o StrictHostKeyChecking=no --archive --human-readable --delete-after ./myrepo/build/ [email protected]:/var/my_website/public/
[email protected]'s password:
$ ssh [email protected] -i ~/.ssh/deploy_key
Last failed login: Thu Sep 21 23:51:25 UTC 2023 from 200.41.22.221 on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Thu Sep 21 23:50:46 2023 from 207.12.88.243
[user@server ~]$ But if I surround the ssh params as a string it works: rsync -e "ssh -p 22 -i /home/nnieto/.ssh/deploy_key -o StrictHostKeyChecking=no" --archive --human-readable --delete-after ./myrepo/build/ [email protected]:/var/my_website/public/
$ echo $?
0 |
需要使用rsa的密钥,转换与错误见: https://stackoverflow.com/questions/59805803/invalid-format-when-creating-an-id-rsa-file-with-node https://stackoverflow.com/questions/54994641/openssh-private-key-to-rsa-private-key 修复permission denied SamKirkland/web-deploy#10 https://blog.csdn.net/tyustli/article/details/122222605
需要使用rsa的密钥,转换与错误见: https://stackoverflow.com/questions/59805803/invalid-format-when-creating-an-id-rsa-file-with-node https://stackoverflow.com/questions/54994641/openssh-private-key-to-rsa-private-key 修复permission denied SamKirkland/web-deploy#10 https://blog.csdn.net/tyustli/article/details/122222605
需要使用rsa的密钥,转换与错误见: https://stackoverflow.com/questions/59805803/invalid-format-when-creating-an-id-rsa-file-with-node https://stackoverflow.com/questions/54994641/openssh-private-key-to-rsa-private-key 修复permission denied SamKirkland/web-deploy#10 https://blog.csdn.net/tyustli/article/details/122222605
需要使用rsa的密钥,转换与错误见: https://stackoverflow.com/questions/59805803/invalid-format-when-creating-an-id-rsa-file-with-node https://stackoverflow.com/questions/54994641/openssh-private-key-to-rsa-private-key 修复permission denied SamKirkland/web-deploy#10 https://blog.csdn.net/tyustli/article/details/122222605
Bug Description
I have tried several different attempts at generating SSH keys (both via github and from cpanel), both fail to connect via web-deploy action. When I try it from my local PC to connect, it's totally fine and authenticates. I have also added the public SSH key to github.
My Action Config
My Action Log
The text was updated successfully, but these errors were encountered: