Skip to content

xxh fails when VisualHostKey=yes #87

@onokatio

Description

@onokatio

Local OS (where xxh is installed):
ArchLinux

Destination host OS:
Debian

xxh version:
xxh/0.8.3

xxh-plugins installed:
no plugin installed

xxh config
empty

Steps to Reproduce

  1. Set VisualHostKey yes to ~/.ssh/config.
  2. Run xxh server +vv
  3. The output log:
Traceback (most recent call last):
  File "/usr/bin/xxh", line 12, in <module>
    xxh.main()
  File "/usr/lib/python3.8/site-packages/xxh_xxh/xxh.py", line 773, in main
    host_info = self.get_host_info()
  File "/usr/lib/python3.8/site-packages/xxh_xxh/xxh.py", line 337, in get_host_info
    r = dict([l.split('=') for l in r.replace('\r','').split('\n') if l.strip() != '' and '=' in l])
ValueError: dictionary update sequence element #2 has length 3; 2 is required
  1. What is the problem

I inserted this line to xxh.py at line 336

self.eprint([l.split('=') for l in r.replace('\r','').split('\n') if l.strip() != '' and '=' in l]
)

Then, I got this

[['|  ..oo++ ', '+.*.E  |'], ['|  . o ', '     . o .|'], ['|          .E+o', 'o', '|'], ['|         ..', '.', '*.*|'], ['|        S o +O+', '*|'], ['|           .++', 'oB|'], ['|             + +', '|'], ['|               .', '|'], ['debug1: kex_input_ext_info: server-sig-algs', '<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>'], ['xxh_home_realpath', '/home/xxx/.xxh'], ['xxh_version', 'dir_not_found'], ['xxh_shell_exists', '0'], ['xxh_home_writable', '0'], ['xxh_parent_home_writable', '1'], ['rsync', '/usr/bin/rsync'], ['scp', '/usr/bin/scp'], ['shell', '/usr/bin/zsh'], ['kernel', 'Linux'], ['arch', 'x86_64']]
Traceback (most recent call last):
  File "/usr/bin/xxh", line 12, in <module>
    xxh.main()
  File "/usr/lib/python3.8/site-packages/xxh_xxh/xxh.py", line 773, in main
    host_info = self.get_host_info()
  File "/usr/lib/python3.8/site-packages/xxh_xxh/xxh.py", line 337, in get_host_info
    r = dict([l.split('=') for l in r.replace('\r','').split('\n') if l.strip() != '' and '=' in l])
ValueError: dictionary update sequence element #2 has length 3; 2 is required

So, I remove VisualHostKey=yes and output is this:

[['debug1: kex_input_ext_info: server-sig-algs', '<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>'], ['xxh_home_realpath', '/home/xxx/.xxh'], ['xxh_version', 'dir_not_found'], ['xxh_shell_exists', '0'], ['xxh_home_writable', '0'], ['xxh_parent_home_writable', '1'], ['rsync', '/usr/bin/rsync'], ['scp', '/usr/bin/scp'], ['shell', '/usr/bin/zsh'], ['kernel', 'Linux'], ['arch', 'x86_64']]
server:/home/xxx/.xxh/.xxh/shells/xxh-shell-zsh not found. Install xxh-shell-zsh? [Y/n]

For community:
⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions