macOS 远程ssh错误修复
1. 问题
运行 ssh 远程时,出现以下错误:
/etc/ssh/sshd_config.d/100-macos.conf: line 2: Bad configuration option: usepam
/etc/ssh/sshd_config.d/100-macos.conf: line 3: Bad configuration option: acceptenv
/etc/ssh/sshd_config.d/100-macos.conf: terminating, 2 bad configuration options
2. 解决方案
打开文件:
sudo vim /etc/ssh/ssh_config
修改内容:
#Include /etc/ssh/sshd_config.d/*
Include /etc/ssh/ssh_config.d/*
# 注释这一行
#AuthorizedKeysFile .ssh/authorized_keys