sshs icon indicating copy to clipboard operation
sshs copied to clipboard

Parsing Error: SshConfig(UnparseableLine("\t")) with Minimal SSH Configuration on RHEL 9 only when cargo install

Open Razcall opened this issue 1 year ago • 2 comments

Description:
When launching sshs without explicitly specifying a configuration file (i.e., simply running sshs), I receive the following error:

Error: Failed to parse SSH configuration file: SshConfig(UnparseableLine("\t"))

This error suggests that a line containing a tab character is encountered, even though my configuration is minimal and does not include any indentation or tabs.

Steps to Reproduce:

  1. Minimal User Configuration:
    In my ~/.ssh/ directory, I have a minimal configuration file with the following content:

    # ssh config
    Include ~/.ssh/config.d/*
    

    The output of cat -A ~/.ssh/config shows:

    Include ~/.ssh/config.d/*$
    
  2. Explicit Configuration Loading:
    Running the command with an explicit configuration file works fine:

    sshs -c ~/.ssh/config
    
  3. Default Configuration Loading:
    Running simply:

    sshs
    

    produces the error indicating a tab character at the beginning of a line.

What I Have Verified:

  • I removed any extra configuration files in my ~/.ssh/ directory to ensure the issue is not originating from additional user configuration.
  • The output of cat -A ~/.ssh/config confirms that the file does not contain any tab or indentation characters.
  • I also checked the contents of the files inside ~/.ssh/config.d/ and found no unexpected tab characters.
  • The error only appears when the configuration is loaded by default, not when explicitly specified using the -c option.
  • I have uinstalled the cargo install "brewed installed" it and it worked flawlessly with or without .ssh/config configuration

Environment Details:

  • sshs Version: v4.6.1 (commit ab691285)
  • Installation Method: Cargo (cargo install --git https://github.com/quantumsheep/sshs)
  • Operating System: RHEL 9

Expected Behavior:
sshs should load my minimal configuration without encountering any parsing errors related to unexpected tab characters.

Thank you for your time and for maintaining this project.

Razcall avatar Apr 11 '25 14:04 Razcall

I maintain a similar tool ssm which doesn't have this issue https://github.com/lfaoro/ssm/tree/main

lfaoro avatar Apr 20 '25 22:04 lfaoro

Hello! It should be fixed in 4.7.0.

quantumsheep avatar Apr 21 '25 10:04 quantumsheep