ITADN

Can't override plugin's `PreferredAuthentications`

#143Openbstrdsmkr 创建于 2026-04-10
B
bstrdsmkrcommented
In my setup, I'm using SOCKS mode to a server that requires keyboard-interactive auth. It also expects an OTP, so I set the Authentication to `Password` and `Always ask`. Unfortunately, the plugin hardcodes the PreferredAuthentications based on this setting here: https://github.com/danfruehauf/NetworkManager-ssh/blob/ddfa83b493b334a2ed728127e85d6d22a899fc3f/src/nm-ssh-service.c#L1065 which causes the authentication to fail since the server requires `keyboard-interactive` instead of `password`. I commented out this line locally and rebuilt and am able to connect successfully. These "command line" flags take precedence over any other config set for ssh. Since we can't set arbitrary ssh parameters due to privilege escalation risks and the plugin already runs as `root` and checks root's known_hosts, it seems like it would make sense to not set the `PreferredAuthentications` in the plugin and let that be set via /etc/ssh/ssh_config.d/ or etc. Unless there's some other way to configure this that I've missed?
1 条评论