【问题标题】:ssh connection closed on connectssh 连接在连接时关闭
【发布时间】:2017-04-13 12:59:12
【问题描述】:

在 Mac OS 的终端中输入

ssh login@xx.xx.xx.xx

在那个密码之后。

马上看到

Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 2.6.32-042stab120.6 i686)
* Documentation:  https://help.ubuntu.com/
Last login: Tue Nov 29 14:38:45 2016 from yy.yy.yy.yy
Connection to xx.xx.xx.xx closed.

为什么连接被关闭了?

【问题讨论】:

    标签: macos ssh terminal


    【解决方案1】:

    使用ssh -v login@xx.xx.xx.xx 并检查输出以获取有关连接断开的提示。

    【讨论】:

      【解决方案2】:

      验证您使用的用户(例如login)是否有权通过服务器访问 ssh。

      您的.bash_profile 中也可能有一个exit 0。这将导致会话在登录后立即关闭。 你可以试试这个命令来删除它:ssh david@0.0.0.1 sed -i '/exit\ 0/d' .bashrc .bash_profile .profile .login

      【讨论】:

        猜你喜欢
        • 2014-01-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-11-13
        • 1970-01-01
        • 2019-07-27
        相关资源
        最近更新 更多