mac 無法ssh localhost奈泪,錯(cuò)誤提示:bash: /usr/local/bin/ssh_session: Permission denied
在網(wǎng)上找了很久也沒有找到解決方案侣颂,最后根據(jù)提示自己摸索如下:
1.編輯/etc/sshd_config文件隔节,注釋掉
#ForceCommand /usr/local/bin/ssh_session
2.啟動(dòng)sshd服務(wù):
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
3.停止sshd服務(wù):
sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
4查看是否啟動(dòng):
sudo launchctl list | grep ssh
如果看到下面的輸出表示成功啟動(dòng)了:
--------------
-?0?com.openssh.sshd
5.最后ssh localhost 成功