Skip to content

ssh config settings outside of a Host block show a warning and fail #6

@morbeo

Description

@morbeo

When directives are present that are outside of a Host block a warning is shown and the program exits with status code 1.
I have the following at the top of my ssh config file:

PermitLocalCommand yes
Include config.d/*

and some hosts

$ grep -c -w ^Host ~/.ssh/config
16

but I am getting the following warning unless I comment the first two settings

$ uvx --from sshclick sshc hosts
WARNING:root:Config info without Host definition on SSH-config line number 0
$ head -2 ~/.ssh/config
#PermitLocalCommand yes
#Include config.d/*

$ uvx --from sshclick sshc hosts
┌──────┬─────────┬────────┬────────────────┬────────────┐
│ name │ group   │ type   │ param:hostname │ param:user │
├──────┼─────────┼────────┼────────────────┼────────────┤
│ g    │ default │ normal │ ***            │ root       │
│ am   │ default │ normal │ ***            │ root       │
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions