appleboy / ssh-action

GitHub Actions for executing remote ssh commands.

Home Page:https://github.com/marketplace/actions/ssh-remote-commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Legacy algorithm support

abdelhamid-attaby opened this issue · comments

I got the following message when trying to ssh a BlueHost server:

2020/05/23 13:43:07 ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256]

Even when I try ssh-action@v0.0.9.

related to issue appleboy/scp-action#15

@abdelhamid-attaby Can you provide detailed steps about how to generate the ssh key?

Add the algorithm to your client config:

  1. open /etc/ssh/ssh_config
  2. update KexAlgorithms setting and add diffie-hellman-group-exchange-sha256

@appleboy I generated the key using the Manage SSH Keys in cPanel.

Add the algorithm to your client config:

  1. open /etc/ssh/ssh_config
  2. update KexAlgorithms setting and add diffie-hellman-group-exchange-sha256

Which client config, I am using Github Actions.

@abdelhamid-attaby Can you login to your server via ssh?

@appleboy Yes I can using a downloaded private key.

@appleboy any idea? The KexAlgorithm should be added to the compiled ubuntu image of the ssh-action.

@abdelhamid-attaby I will take it.

@appleboy same here 🙁

@abdelhamid-attaby Please add the following:

use_insecure_cipher: true

see https://github.com/appleboy/ssh-action#input-variables

@abdelhamid-attaby Please add the following:

use_insecure_cipher: true

see https://github.com/appleboy/ssh-action#input-variables

@appleboy same


2020/05/24 03:06:24 ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256]

@abdelhamid-attaby Please help to try the master version

uses: appleboy/ssh-action@master

@abdelhamid-attaby Can you post your config?

@abdelhamid-attaby Can you post your config?


name: Deploy to Prod
on:
  push:
    branches: 
      - master
jobs:
  Deploy-To-Dev:
    name: Build and Deploy
    runs-on: ubuntu-latest
    steps:
    - name: executing remote ssh commands using key
      uses: appleboy/ssh-action@master
      with:
        host: coligotech.com
        username: coligote
        key: ${{ secrets.KEY }}
        passphrase: ${{ secrets.PASSPHRASE }}
        use_insecure_cipher: true

        script: |
          cd public_html/almoultka
          git checkout master
          git pull

@abdelhamid-attaby

Please re-run again and make sure the image cache layer.

chore__update_to_latest_version_·_appleboy_ssh-action_1cb5cd3

@appleboy worked now 👌. Thanks a lot 🙏. It is an amazing action by the way.

@abdelhamid-attaby I will bump the new version. Thanks for your testing.