Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Match does not allow 'all' mixed with anything but 'canonical' #2361

Open
fssdfhsdfsdk opened this issue Feb 17, 2024 · 0 comments
Open
Labels

Comments

@fssdfhsdfsdk
Copy link

Are you using paramiko as a client or server?

Client

What feature(s) aren't working right?

SSH

What version(s) of paramiko are you using?

3.4.0 to now

What version(s) of Python are you using?

3.7

What operating system and version are you using?

Linux euleros

If you're connecting as a client, which SSH server are you connecting to?

No response

If you're using paramiko as part of another tool, which tool/version?

No response

Expected/desired behavior

don't throw exception

Actual behavior

File "test.py", line 4, in
with Connection(host="xx.xx..xx.xx", user="root", connect_kwargs={"password": "xxxx"}) as c:
File "/usr/local/lib/python3.7/site-packages/fabric/connection.py", line 380, in init
config = Config()
File "/usr/local/lib/python3.7/site-packages/fabric/config.py", line 163, in init
self.load_ssh_config()
File "/usr/local/lib/python3.7/site-packages/fabric/config.py", line 193, in load_ssh_config
self._load_ssh_files()
File "/usr/local/lib/python3.7/site-packages/fabric/config.py", line 256, in _load_ssh_files
self._load_ssh_file(os.path.expanduser(path))
File "/usr/local/lib/python3.7/site-packages/fabric/config.py", line 269, in _load_ssh_file
self.base_ssh_config.parse(fd)
File "/usr/local/lib/python3.7/site-packages/paramiko/config.py", line 159, in parse
context["matches"] = self._get_matches(value)
File "/usr/local/lib/python3.7/site-packages/paramiko/config.py", line 555, in _get_matches
raise ConfigParseError(err)
paramiko.ssh_exception.ConfigParseError: Match does not allow 'all' mixed with anything but 'canonical'

How to reproduce

I find the /etc/ssh/ssh_config with below content:

Match final all

if I remove final, it dont throw exception. Is there really need this check?

and I check ssh_config man page:

The all criteria must appear alone or immediately after canonical or final.

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant