Skip to content
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

Issue with "diffie-hellman-group-exchange-sha256" - "handshake failed: ssh: no common algorithm for key exchange;" #245

Open
harnerdesigns opened this issue Apr 24, 2023 · 2 comments

Comments

@harnerdesigns
Copy link

Hello,

I'm trying to use the ssh-action action to modify some things on my server. I can connect to the server fine through SSH on the command line so the key works. However, when I run the action with the same key, it outputs the error:

handshake failed: ssh: no common algorithm for key exchange; client offered: [curve25519-sha256 [email protected] ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha256 diffie-hellman-group14-sha1 ext-info-c], server offered: [diffie-hellman-group-exchange-sha256]

Per issue #56, I added the use_insecure_cipher: true option, but then that gives me the error:

2023/04/24 19:00:16 ssh.ParsePrivateKey: asn1: structure error: length too large
2023/04/24 19:00:16 ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain

Which I'm assuming means I need to regenerate the SSH key, but it's throwing me off that the key works fine when just directly SSH-ing through the command line, but doesn't work here.

Config:

    steps:
    - name: Run Backup Script
      uses: appleboy/[email protected]
      with:
        host: ${{ secrets.DEPLOY_HOST }}
        username: ${{ secrets.DEPLOY_USER }}
        key: ${{ secrets.DEPLOY_KEY }}
        port: ${{ secrets.DEPLOY_PORT }}
        script: |
          cd /var/www/***
          ./***

Any help or insight here would be greatly appreciated!

@appleboy
Copy link
Owner

@harnerdesigns What is your OS and sshd version?

@harnerdesigns
Copy link
Author

@appleboy

OS: It's a BlueHost shared server (I know I know, EIG sucks, but it wasn't my choice to host them there) so the normal OS checking commands are giving me grief, I believe it's a modified version of CentOS 7

SSH: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants