我同樣有一個關於一個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
而無需在目標系統上運行任何命令或我如何讓sshd
讓我登錄而不需要密鑰?
感謝您的幫助,如果有任何..?!
是否可以安裝`在/ etc/SSH /`我的目標硬盤到我的`的/ etc/SSH /`並在我的機器上運行`dpkg-reconfigure openssh-server`,或者這些密鑰必須匹配'真實'設置(內核版本,用戶名,體系結構...)上的任何內容? – Simon 2011-02-03 07:57:20