mac无法ssh localhost
生活随笔
收集整理的這篇文章主要介紹了
mac无法ssh localhost
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
From: http://www.2cto.com/os/201203/123274.html
?
mac 無法ssh localhost,錯誤提示:bash: /usr/local/bin/ssh_session: Permission denied
在網上找了很久也沒有找到解決方案,最后根據提示自己摸索如下:
1.編輯/etc/sshd_config文件,注釋掉
#ForceCommand /usr/local/bin/ssh_session
2.啟動sshd服務:
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
3.停止sshd服務:
sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
4查看是否啟動:
sudo launchctl list | grep ssh
如果看到下面的輸出表示成功啟動了:
--------------
-?0?com.openssh.sshd
5.最后ssh localhost 成功
總結
以上是生活随笔為你收集整理的mac无法ssh localhost的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我的世界服务器物品管理,JEI物品管理器
- 下一篇: (转)java中的 | ^ 分别是什么