Skip to content

Add --ssh-config-readonly flag to disable writing back to ~/.ssh/config #89

@yaronuliel

Description

@yaronuliel

Checks

Motivation

Add option to open the app so that hosts defined in ~/.ssh/config (and in the future in other config files via flag or Include directive) - will not be editable

I think that there should be a single point of truth, and a unidirectional configuration flow (from the generic .ssh/config to lazyssh)
This feature will also allow users to guard their config against future bugs in lazyssh that might corrupt the file and lead to frustration.

In addition to all that - when openssh launch a new feature/config property that is not yet supported in lazyssh - it may cause issues with the write-back mechanism

Implementation

  • Add a new CLI flag
-ssh-config-readonly
         Read hosts from openssh's config file in a readonly mode (changes not being written back to .ssh/config)
  • Add support for setting the flag via a new environment variable LAZYSSH_SSH_CONFIG_READONLY=1

  • If flag in on - Disable the edit panel, or, change "edit" to "details" and make the data readonly

Are you willing & able to help?

  • I am able to submit a PR!
  • I can help test the feature!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions