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

Enable SSH Cyphers #9

Open
gonzalu opened this issue Oct 31, 2023 · 1 comment
Open

Enable SSH Cyphers #9

gonzalu opened this issue Oct 31, 2023 · 1 comment

Comments

@gonzalu
Copy link

gonzalu commented Oct 31, 2023

How can I tell jazigo to use a specific SSH cypher? A lot of our routers have older code that does not support newer protocols.

In my ssh config file, I have enabled these but jazigo is ignoring these settings.

Is there a way to ask jazigo to pay attention to ssh config in user folder ( ~/.ssh/config ) or global settings ( /etc/ssh/ssh_config ) ??

Alternatively, allow the actual ssh command to be specified in the jazigo host config?

Thank you for your help.

@udhos
Copy link
Owner

udhos commented Nov 2, 2023

Hi,

I have just added these device properties into v0.13.0 to specify the ssh ciphers in a per-device basis:

    sshclearciphers: true # remove all default ciphers
    sshaddciphers:
        - aes128-ctr      # add cipher aes128-ctr

However I noticed the cipher 3des-cbc I used to specify hard-coded for IOS XR is no longer supported by current Go SSH libs. I don't know how to work around this issue to allow old ciphers.

Yes, one could hack jazigo to make it to consider ciphers defined in ~/.ssh/config, however it would not help with the more critical issue that current Go libraries reject many old ciphers.

One thing you might want to try is to use the pseudo model called "runprog".
It allows you to call an external program to collect the configuration for you.
You could point it to a shell script that invokes ssh, for instance.

https://github.com/udhos/jazigo#calling-an-external-program

    runprog:
    - /usr/local/bin/my-script.sh
    - parameter-for-my-script

When jazigo calls your program, it sets up these env vars for your program to use:

    JAZIGO_DEV_ID=deviceid
    JAZIGO_DEV_HOSTPORT=host[:port] -- port is optional
    JAZIGO_DEV_USER=username
    JAZIGO_DEV_PASS=password

Your program should output the config to standard output, then jazigo will handle it as usual.

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