Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
TBD
==============

Bug Fixes
--------
* Gracefully catch Paramiko parsing errors on `--list-ssh-config`.


1.44.2 (2026/01/13)
==============

Expand Down
13 changes: 9 additions & 4 deletions mycli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,12 +1639,17 @@ def cli(
sys.exit(0)
if list_ssh_config:
ssh_config = read_ssh_config(ssh_config_path)
for host in ssh_config.get_hostnames():
try:
host_entries = ssh_config.get_hostnames()
except KeyError:
click.secho('Error reading ssh config', err=True, fg="red")
sys.exit(1)
for host_entry in host_entries:
if verbose:
host_config = ssh_config.lookup(host)
click.secho(f"{host} : {host_config.get('hostname')}")
host_config = ssh_config.lookup(host_entry)
click.secho(f"{host_entry} : {host_config.get('hostname')}")
else:
click.secho(host)
click.secho(host_entry)
sys.exit(0)
# Choose which ever one has a valid value.
database = dbname or database
Expand Down