gpt4 book ai didi

ssh - Erlang SSH 守护进程没有主机 key 算法

转载 作者:行者123 更新时间:2023-12-02 13:48:29 24 4
gpt4 key购买 nike

我正在尝试运行 otp 中为 ssh 守护程序提供的以下示例: https://raw.github.com/erlang/otp/maint/lib/ssh/examples/ssh_sample_cli.erl

1> c(ssh_sample_cli).
ssh_sample_cli.erl:146: Warning: this expression will fail with a 'badarith' exception
{ok,ssh_sample_cli}
2> ssh_sample_cli:listen(1111).
{ok,<0.51.0>}

我尝试从我的 shell 进行连接,但我得到以下信息:

$ ssh localhost -p 1111 -oLoglevel=DEBUG
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to localhost [::1] port 1111.
debug1: Connection established.
debug1: identity file /Users/eric/.ssh/id_rsa type 1
debug1: identity file /Users/eric/.ssh/id_rsa-cert type -1
debug1: identity file /Users/eric/.ssh/id_dsa type -1
debug1: identity file /Users/eric/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version Erlang
debug1: no match: Erlang
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-sha1 none
debug1: kex: client->server aes128-cbc hmac-sha1 none
no hostkey alg
$

为什么会这样?我错过了什么?

最佳答案

我的主机 key 必须可以从 Erlang 访问。解决方案是将我的 ssh 主机 key 复制到文件夹更改权限,以便 Erlang 可以访问它并使用 {system_dir, "/<folder>/ssh/"}选项。

关于ssh - Erlang SSH 守护进程没有主机 key 算法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13661929/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com