在向VM添加AADSSHLogin扩展期间,以下条目将添加到/etc/ssh/sshd_config
Match User *@*,????????-????-????-????-???????????? # Added by aadsshlogin installer
AuthenticationMethods publickey
PubkeyAuthentication yes
AuthorizedKeysCommand /usr/sbin/aad_certhandler %u %k
AuthorizedKeysCommandUser root它会导致"sshd -T“命令中出现以下错误:
$ sudo sshd -T|grep passw
'Match User' in configuration but 'user' not in connection test specification.当禁用上面的行时,该命令运行时没有错误:
例如:
$ sudo sshd -T|grep passw
kerberosorlocalpasswd yes
passwordauthentication no
permitemptypasswords no对于此更改(由微软的sshd_config包在AASSSHLogin包中引入),有什么解决办法可以解决吗?
发布于 2022-01-26 06:59:12
sshd -T|grep密码在配置中匹配用户,但在连接测试规范中不匹配“用户”。
上面的错误标记为bug,可以在GitHub问题页中提到的较新版本中修复,但解决此问题的方法之一是:
sshd -T -C user=root -C host=localhost -C addr=localhost-C。根据手册页面,-C应该是可选的,在旧版本中也是如此。参考资料:
https://stackoverflow.com/questions/70853176
复制相似问题