Eugeny / russh

Rust SSH client & server library
https://docs.rs/russh
870 stars 91 forks source link

fix: process multiple host entries #331

Closed CertainLach closed 3 weeks ago

CertainLach commented 3 weeks ago

PR https://github.com/Eugeny/russh/pull/306 broke russh config parsing for me.

My ssh config looks roughly like this:

Host *
    Common settings
Host wanted
   Host-specific settings

Before https://github.com/Eugeny/russh/pull/306 common settings were ignored, but after - common settings were applied, yet config parser stops right on next Host section start, so settings I need were ignored instead.

This PR brings behavior closer to what openssh itself does - for requested host, it applies all the settings with maching glob, not only the first one.

Eugeny commented 3 weeks ago

Thank you!

Eugeny commented 3 weeks ago

@all-contributors please add @CertainLach for code

allcontributors[bot] commented 3 weeks ago

@Eugeny

I've put up a pull request to add @CertainLach! :tada: