【问题标题】:Unable to ssh into QNX 6.5.0 VirtualBox session无法通过 ssh 进入 QNX 6.5.0 VirtualBox 会话
【发布时间】:2021-08-22 02:01:39
【问题描述】:

我已经在 virtualbox 上重新安装了 QNX RTOS 6.5.0,我可以使用以下命令 ssh 进入它:ssh root@127.0.0.1 -p 3022。我的 VirtualBox 环境中的网络设置设置为 NAT,端口转发设置为:

尝试使用-vvv 标志连接时:

$ ssh -vvv root@127.0.0.1 -p 3022
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /home/main/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "127.0.0.1" port 3022
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 3022.
debug1: Connection established.
debug1: identity file /home/main/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/main/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
ssh_exchange_identification: Connection closed by remote host

在 QNX 上,我在 /etc/ssh/sshd_config 中修改了以下选项:

PermitRootLogin yes
PermitEmptyPasswords yes
Subsystem sftpd /usr/libexec/sftp-server

我也可以通过 vm SSH 进入我的笔记本电脑,但反过来不行。我还尝试 ssh'ing 到我的笔记本电脑,它可以工作,然后在同一个 vm 会话中 ssh'ing 回 vm 并出现相同的错误。

【问题讨论】:

    标签: ssh qnx


    【解决方案1】:

    解决了。解决方案是生成新的 rsa 和 dsa 密钥:

    random -t
    ssh-keygen -t rsa -f /etc/ssh/ssh_host_key -b 1024
    ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
    

    然后将 sshd 添加到 /etc/group 列表中:sshd:x:6:root

    然后重新运行 sshd:/usr/sbin/sshd

    来源:How do you install an ssh server on qnx?

    为了扩展上述来源的解决方案,我发现在重新启动时我不再能够通过 ssh 进入虚拟机。通过进入/etc/rc.d/ 并将/usr/sbin/sshd 行添加到rc.local 文件中解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2017-02-17
      • 2015-07-31
      • 2021-11-20
      • 1970-01-01
      • 1970-01-01
      • 2014-09-26
      • 1970-01-01
      • 1970-01-01
      • 2021-08-08
      相关资源
      最近更新 更多