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:
- open
/etc/ssh/ssh_config
- update
KexAlgorithms
setting and adddiffie-hellman-group-exchange-sha256
@appleboy I generated the key using the Manage SSH Keys
in cPanel
.
Add the algorithm to your client config:
- open
/etc/ssh/ssh_config
- update
KexAlgorithms
setting and adddiffie-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 Thanks
@abdelhamid-attaby Please help to try https://github.com/appleboy/ssh-action/releases/tag/v0.1.0 version and give me feedback.
@appleboy same here 🙁
@abdelhamid-attaby Please add the following:
use_insecure_cipher: true
@abdelhamid-attaby Please add the following:
use_insecure_cipher: true
@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
@appleboy same
@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
@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.