-
-
Notifications
You must be signed in to change notification settings - Fork 574
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
handshake failed: ssh: unable to authenticate, attempted methods [publickey], no supported methods remain. #323
Comments
Can you help to try the v1.0.3 version? |
Please provide the ssh server version and |
@Roman-Dev00 Please provide the following information:
|
Hi, @appleboy |
@Roman-Dev00 Where is the Cpanel? Can you provide more detailed information? I need the information to reproduce the issue. |
@Roman-Dev00 I need the information about what is your CPanel Provider. I want to register a new account and reproduce the problem. |
we used a managed VPS at namecheap. |
I didn't find the solution yet. |
@Roman-Dev00 Try |
Hi, @appleboy |
@Roman-Dev00 you missing typo
|
I've also had issues with methods [none], my server version is Ubuntu22.04, so I added a "/etc/ssh/sshd_config.d/enable_rsa_keys.conf" file as per the docs and it worked fine https://github.com/appleboy/ssh-action?tab=readme-ov-file#if-you-are-using-openssh |
Going through the same problem. I have literally tried everything I could from documentation or any other suggestion given on the internet. Let me put some of the settings which I had used and hope it helps.
I'm on DigitalOcean basic $6 droplet having I had tried RSA keys also, same issue. I had tried @appleboy Let me know if you need more information. |
Add |
adding a line break to the end of the secret key worked for me, credit; https://groups.google.com/a/chromium.org/g/chromium-hterm/c/X-_u_5hJyKw/m/EwBqmHVqIAAJ |
I resolved this issue before by uncommenting this line of code and commenting the authorized keys line so that it allows all the keys on my vps. Try that and let me know how it goes. |
A good way to debug this putting the id_rsa (the key) in a file on your local system and running: ssh -vvv -i /path/to/your/key user@your-instance-ip and keep a log open on the server; tail -f /var/log/auth.log It generally will not be able to connect like that either if it cannot connect via github, and this is far easier/faster to diagnose the issue. Issues I have seen in the wild:
I did not find any issues once I was able to login with that, to login via Actions (any version I tried). The formatting of the key (on 1 line, extra enters etc) don't seem to matter, at least not as far as i have seen. |
I bump the new version |
Hello, @Cabalist , @appleboy.
Hello, everyone
Sorry about reposting the same issue like as 80.
I have read your solutions carefully and tried to follow all of your suggestions such as
But I still have [none publickey] error.
Please help me.
Thanks.
Here is my mail.yml file.
name: Laravel CI/CD
on:
push:
branches:
jobs:
setup:
runs-on: ubuntu-latest
steps:
name: Checkout Repository
uses: actions/checkout@v2
name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
deploy:
runs-on: ubuntu-latest
needs: setup
steps:
name: Checkout Repository
uses: actions/checkout@v2
name: Deploy to FTP
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./ # Change this to the path of your Laravel app
server-dir: / # Change this to the remote directory on your FTP server
name: SSH into Server and Run Migration
uses: appleboy/ssh-action@v0.1.4
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME}}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
cd /home/lcgen/public_html/backend
php artisan migrate --force
php artisan config:cache
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
I already confirmed the public key in the authorizedkeys. It is same with public key which authorized key in my cpanel.
I also have a SSH_PASSWORD variable in github secrets.
Should I add this one in the yml like "password: ${{ SSH_PASSWORD }}" even though I set the .ssh permission with 700?
And also what can be wrong in my current status?
I am not sure why this error has been occurred?
The text was updated successfully, but these errors were encountered: