AngryPanda
V2EX  ›  问与答

iTerm2: A session ended very soon after starting. Check that the command in profile "xxx" is correct.

  •  
  •   AngryPanda · Sep 13, 2018 · 2314 views
    This topic created in 2880 days ago, the information mentioned may be changed or developed.

    然而我先登录到 macOS 的 shell,然后: ssh root@host 却正常登录。

    经查,iTerm2 中配置的 Command 和我手动输入的命令完全一致。

    看了 iTerm2 本地日志,内容是: Host key verification failed. 然而我手动输入也是用的密钥认证啊。

    以下尝试过的方案,均无效:

    1. 清除了本地的 known_hosts 文件
    2. 清除了远程的 authorized_keys 文件

    另外, iTerm2 免密登录其他 host 均正常。这个问题遇到过几次了。不知何故?

    AngryPanda
        1
    AngryPanda  
    OP
       Sep 13, 2018
    找到原因了,iTerm2 的 profile command 输入框居然可以输入多行文本....有一些字符在其他不可见的地方。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2791 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 12:37 · PVG 20:37 · LAX 05:37 · JFK 08:37
    ♥ Do have faith in what you're doing.