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

Unable to Specify -ohostkeyalgorithms=+ssh-dss #265

Open
arununzer opened this issue Aug 14, 2023 · 8 comments
Open

Unable to Specify -ohostkeyalgorithms=+ssh-dss #265

arununzer opened this issue Aug 14, 2023 · 8 comments

Comments

@arununzer
Copy link

arununzer commented Aug 14, 2023

Hello Team,

I need to use this github actions to login to a machine and to run a shell Script.

  • name: executing remote ssh commands using password
    uses: appleboy/ssh-action@v0.1.10
    with:
    host: ${{ secrets.BILLING_HOST }}
    username: ${{ secrets.BILLING_USER }}
    password: ${{ secrets.BILLING_PASS }}
    port: ${{ env.PORT }}
    script_stop: true
    script: ssh -ohostkeyalgorithms=+ssh-dss user@20.x.x.x "echo Hello"

However, i need to pass The host key Algorithm to login.. May i ask how to pass the same ?

@appleboy

@arununzer
Copy link
Author

@appleboy Any updates on this ?

1 similar comment
@arununzer
Copy link
Author

@appleboy Any updates on this ?

@appleboy
Copy link
Owner

@arununzer Hi sorry for the late response. Your scenario is the following flow:

     +--------+       +----------+      +-----------+
     | Laptop | <-->  | Jumphost | <--> | FooServer |
     +--------+       +----------+      +-----------+

right?

@arununzer
Copy link
Author

arununzer commented Aug 29, 2023

Hello @appleboy , No jump hosts .....its from Github action runner (hosted in EKS) ...i need SSH directly to the instance using this :

ssh -ohostkeyalgorithms=+ssh-dss user@20.x.x.x "bash ./billing.sh"

@appleboy
Copy link
Owner

@arununzer

pass environment variable to shell script

Try https://github.com/appleboy/ssh-action#pass-environment-variable-to-shell-script

@arununzer
Copy link
Author

arununzer commented Aug 29, 2023

@appleboy

can you please share as an Example keeping this ?

  • name: Run SSH command
    uses: appleboy/ssh-action@master
    with:
    host: ${{ secrets.BILLING_HOST }}
    username: ${{ secrets.BILLING_USER }}
    password: ${{ secrets.BILLING_PASS }}
    port: 22
    use_insecure_cipher: true
    debug: true
    script: |
    echo "${{ steps.generatedpassword.outputs.pass }}"
    ssh -ohostkeyalgorithms=+ssh-dss a.krishnakumar@1x.x.x.x "bash ./billing.sh"

Like Where i should pass the hostkeyalgorithm ? As the Above is not working

@arununzer
Copy link
Author

@appleboy Can You let me know how i can pass the hostkey algorithm for the Above example ?

@arununzer
Copy link
Author

ignore this as it didnt work..

did a workaround and used it in this way directly

export SSH_OPTIONS='-o StrictHostKeyChecking=no -ohostkeyalgorithms=ssh-dss'
sshpass -p *** ssh $SSH_OPTIONS @ "touch arun.txt"

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