手动获取嵌入式系统上的ssh访问权限(可以直接进行硬盘访问)
我再次提出一个关于ssh问题的问题:
在嵌入式系统(没有显示器,没有键盘)上,我唯一的登录界面是ssh。 Telnet也被禁用。 (我目前正试图以很少的希望启用它......)
我目前唯一的互动是收到一个
ping
的答案并通过smb://
浏览我的共享文件!
ssh的答案总是:
$ ssh -vvvvl root 192.168.0.3
OpenSSH_5.5p1 Debian-4ubuntu4, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.3 [192.168.0.3] port 22.
debug1: Connection established.
debug1: identity file /home/simon/.ssh/id_rsa type -1
debug1: identity file /home/simon/.ssh/id_rsa-cert type -1
debug1: identity file /home/simon/.ssh/id_dsa type -1
debug1: identity file /home/simon/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-8
debug1: match: OpenSSH_4.3p2 Debian-8 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-4ubuntu4
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer
但我通过将硬盘拉出设备并在连接到另一台机器时操纵文件来直接访问硬盘。
在我退出并被锁定之前,我的最后一步是sudo rm /etc/ssh/*host*key*
,然后是dpkg-reconfigure openssh-server
,因为找不到dpkg-reconfigure
而失败了。所以我猜问题是,密钥被删除了。
我现在的问题是:如何在没有在目标系统上运行任何命令的情况下离岸创建密钥并将其提供给sshd
或者如何让我在没有密钥的情况下登录?
如果有任何问题,感谢您的帮助..?!
没有找到相关结果
已邀请:
2 个回复
粟痢凰副
当
要求你输入密码时,点击
而不输入任何内容。主机密钥必须具有空密码。 这将在当前目录中创建以下文件:
然后,您可以安装设备的硬盘驱动器并将这四个文件复制到
。 请注意,当您尝试之后ssh到系统时,您的ssh客户端会抱怨密钥与预期不同,并且可能拒绝连接。如果您正在运行OpenSSH客户端,则可以再次使用
更正此问题:
磐剩