-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain #297
Comments
Also experiencing this issue. I've set the |
I have exact same problem. I followed every instruction in documentation but still same error : However it works using this Github Action : |
Do you have a full working example of a workflow.yml file, for this implementation, that you could share? That would be greatly appreciated, thank you. |
i'm getting the same thing here, after days of going crazy i couldn't figure out what i did wrong, and apparently i'm not the only one facing this issue, i should mention that i'm running a hardened SSH server on Debian 12 using the configuration provided by ssh-audit.com simply trying to follow this guide i found on Youtube and using a separate user as opposed to the |
@real-F-00 Have you solved the problem? |
I fixed my problem and ssh-action is now working. I feel stupid, I was using SSH_USERNAME in my yml file but the secret was called SSH_USER in GitHub Secrets 😑 Here is my working yml file for anyone it might help :
|
Does this deploy to Microsoft Azure? Or are you using a different Cloud Provider? Thanks |
Yes! after days of headaches i finally solved the issue, i think this should be added to the documentation (if it isn't already) but the problem was that the user i was trying to use was locked, to keep the user locked but allowing ssh access to it i used |
@sahgilbert This was made for deployment to a OVHCloud VPS (Virtual Private Server) but I believe it should work for any Linux machine |
@LucasRoquilly Can you provide the ssh username and password through email (appleboy.tw AT gmail.com). Maybe I can try it and get you back soon? Thanks. |
I will try out OVHCloud and promptly inform you if the product becomes available. |
Sorry, I misunderstood @LucasRoquilly. The issue lies with @sahgilbert problem on Azure. I will find time to test the issue on Azure again. |
Hey guys, changing the version for master for ssh worked for me. |
I think the behavior of the
|
Sure i will be happy to.....
======END====== This one for master : Will download drone-ssh-1.7.4-linux-amd64 from https://github.com/appleboy/drone-ssh/releases/download/v1.7.4 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 5580k 100 5580k 0 0 9401k 0 --:--:-- --:--:-- --:--:-- 9401k ======END====== I did get error but it was because of docker commands. However i did get logged in. |
I had exactly the same problem. First, I noticed that my variables did not have the same names in my YAML file and in the secrets repository. Then I realized that I had a passphrase for my private key, so I added it to my YAML file. Finally, the problem was that my key copy contained line breaks. I removed them from each line, and everything worked. This is my YAML file
This is my initial private key when I copied it from my terminalThis is after I removed the line breaks(It's a fake private key) |
Sorry but it's better not to share your private keys |
@aswanth6000 I don't know what you mean. This repo is appleboy/ssh-action |
I changed to master and passed, but I am a super novice, I hope I can help everyone. |
use your local machine private key instead of your vps pvk |
I just followed your comment and it didn't work it shouldn't, since the handshake is not between my local machine & GitHub runners, but rather btw my VPS & GitHub |
I have this same issue, I copied a working workflow to a new repo and it didn't work name: Deploy to VPS
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy to VPS
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_KEY }}
script: |
cd /var/www/domain.dev
git pull origin dev
composer install --no-interaction --prefer-dist
php artisan migrate:fresh --seed
|
I removed the secrets and added them again and it worked |
This worked for me thanks |
I was facing the same issue and spent hours trying to resolve it. Turns out, it was a version issue. Got resolved for me once I started using: |
This fixed it for me. |
appleboy/ssh-action@master Confirming fix. |
Broo. Thank you so much. I was sitting for around 8 hours on this and it worked after I changed it |
it works. |
I have an Asp.Net Core (.Net 8.0) app, straight out of the box from Visual Studio for Mac.
I'm using a MacBook Pro (Silicon chip).
I have generated an SSH RSA key pair on my local mac machine.
I have created an Azure Virtual Machine running Linux.
When I created the Virtual Machine in the Azure Portal, I uploaded my public key which was generated by my previous step.
I have added the 3 required secrets to the source code repository on GitHub, based on the secrets variables in the deploy.yml file, as per the below screenshot:
I'm getting the following error when trying to deploy Asp.Net Core to an Azure Virtual Machine using GitHub Actions & appleboy/ssh-action:
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
I have created a deploy.yml file for the deployment via GitHub Actions, with the following contents
`name: Deploy to Azure VM
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
`
How do I debug this error? Are there some debug settings that I can add to my deploy.yml file?
Thanks
The text was updated successfully, but these errors were encountered: