ssh-action icon indicating copy to clipboard operation
ssh-action copied to clipboard

handshake failed: ssh: unable to authenticate, attempted methods [publickey], no supported methods remain.

Open Roman-Dev00 opened this issue 1 year ago • 24 comments

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

  1. changed the master to v.0.1.14.
  2. give the permission to .ssh and authorizedkeys.
  3. copy pub file to authorizedkeys.

But I still have [none publickey] error. Please help me. Thanks. Here is my mail.yml file.

name: Laravel CI/CD

on: push: branches:

  • main

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/[email protected] 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/[email protected] 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?

Roman-Dev00 avatar May 31 '24 15:05 Roman-Dev00