转自:http://blog.csdn.net/cwj649956781/article/details/37913637

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的更多相关文章

  1. mac 无法ssh localhost

    mac 无法ssh localhost,错误提示:bash: /usr/local/bin/ssh_session: Permission denied在网上找了很久也没有找到解决方案,最后根据提示自 ...

  2. 解决ssh localhost中root@localhost:要求输入密码问题(已经进行了无密码设置登录)

    首先删除~/.ssh目录下的3个文件,如下 id_rsa authorized_keys id_rsa.pub 然后 exit # 退出刚才的 ssh localhostcd ~/.ssh/ # 若没 ...

  3. Mac ping localhost 地址变化

    title: Mac ping localhost 地址变化date: 2016-1-15 16:21:55categories: IOS tags: mac 小小程序猿我的博客:http://day ...

  4. ssh localhost无密码登录设置

    亲测... ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys ...

  5. SSH localhost免密不成功 + 集群状态显示Configured Capacity: 0 (0 KB)

    前一天运行hadoop一切安好,今天重新运行出现BUG.下面对遇到的bug.产生原因以及解决方法进行一下简单总结记录. [bug1]用ssh localhost免密登录时提示要输入密码. 原因分析:之 ...

  6. 【hadoop】ssh localhost 免密码登陆(图解)

    假设系统中有用户test,属于用户组test, 1. 首先确认能否不输入口令就用ssh登录localhost: $ ssh localhost 输出如下所示: 2. 如果不输入口令就无法用ssh登陆l ...

  7. 安装SSH、配置SSH无密码登录 ssh localhost

    集群.单节点模式都需要用到 SSH 登陆(类似于远程登陆,你可以登录某台 Linux 主机,并且在上面运行命令),Ubuntu 默认已安装了 SSH client,此外还需要安装 SSH server ...

  8. 使用ssh localhost命令,发生异常ssh: connect to host localhost port 22: Connection refused

    使用"ssh localhost"命令,失败: 问题分析如下: 出现这个问题是因为Ubuntu默认没有安装openssh-server.检查是否安装了openssh-server, ...

  9. ssh localhost “Permission denied (publickey)

    再次遇到 SSH Server And "Permission denied (publickey) 用这个关键词搜索才找到howtogeek上答案: sshd : Authenticati ...

随机推荐

  1. Noi2011 阿狸的打字机

    ..] of longint; e,q,fa,ps,pt,fail,ans:..] of longint; trie:..,..] of longint; c:..] of longint; s:.. ...

  2. HTTP 响应头信息

    HTTP 响应头信息 HTTP请求头提供了关于请求,响应或者其他的发送实体的信息. 在本章节中我们将具体来介绍HTTP响应头信息.

  3. HDU 5441 离线处理 + 并查集

    题意:给n个节点m条带权值边的无向图.然后q个问题,每次询问点对的数目,点对需要满足的条件是:1)连通:2)其路径的最大权值不能超过询问值. 分析:如果没次询问一次,dfs一次,很可能超时,因此可以用 ...

  4. 架构设计 - Server设计草稿

    DMServer Framework 主要属性: 四个模块部署在不同服务器,双层部分考虑主备和分布式部署. 架构可依据具体前端需求进行裁剪,灵活配置. gate用于业务框架分布式部署,在业务量可控范围 ...

  5. 修改SharePoint 2013中item Created by 信息

    因为公司的系统有点小bug.额,要做点坏事,把系统没记上的东西偷偷补上去,但是item的created by变成了我(这怎么行,不能让别人知道我做了坏事,一定是隔壁小李干的! 懒得开visual st ...

  6. jekins 持续集成手记

    1.安装一个干净Ubuntu14.04桌面版本 2.打开http://jenkins-ci.org/ 官网, 选择use jenkins 中, Installing Jenkins on Ubuntu ...

  7. centos安装与卸载postgresql

    1.卸载旧版本postgresql $ yum remove postgresql* 2.更新yum $ yum update 3.下载pgdg-centos92-9.2-6.noarch.rpm,或 ...

  8. C# 加载 SQLite DLL问题

    /********************************************************************************* * C# 加载 SQLite DL ...

  9. 从AutoCAD和.NET开始

    引自并参考Kean's blog:http://through-the-interface.typepad.com/through_the_interface/2006/07/getting_star ...

  10. 设为首页 添加到收藏夹 (share)

    设为首页,添加到收藏夹 分享自:http://my.oschina.net/lyx2012/blog/60036 设为首页 和 收藏本站js代码 兼容IE,chrome,ff <script t ...