如何使用dropbear连接到iLO的ssh端口?【已解决】

  • k
    kingchy
    我想使用路由通过ssh来进行一些简单的iLO管理,比如,路由开机的时候自动打开一些iLO管理的机器,例如Gen8.

    但是在尝试的过程中发现连不上:

    1. admin@RT-AC68U:/jffs/scripts# ssh Administrator@192.168.x.51

    2. ssh: Connection to Administrator@192.168.x.51:22 exited: Bad hostkey signature
    复制代码



    随后发现,路由上的ssh是dropbear:
    1. admin@RT-AC68U:/tmp/home/root# ssh -V
    2. Dropbear v2017.75
    复制代码



    然后在mac上用brew安装了dropbear进行尝试,发现是同样的问题:
    1. a@Apple $ dbclient Administrator@192.168.x.51

    2. dbclient: Connection to Administrator@192.168.x.51:22 exited: Bad hostkey signature
    3. a@Apple $ dbclient -V
    4. Dropbear v2019.78
    复制代码



    使用dropbear连接到正常到debian/ubuntu是没问题的,使用mac自带的ssh连iLO的ssh也没有问题:
    1. a@Apple $ ssh Administrator@192.168.x.51
    2. Administrator@192.168.x.51's password:
    3. User:Administrator logged-in to ILOxxxxxxx.(192.168.x.51 / FExx::xxxx:xxxx:xxxx:xxxx)

    4. iLO Advanced 2.61 at Jul 27 2018
    5. Server Name: GEN8
    6. Server Power: Off

    7. </>hpiLO->
    复制代码




    看来问题是出在iLO自带的ssh服务器端和dropbear的兼容性上了。因为dropbear不带--verbose参数,也没有办法看问题出在哪一步。

    万能的D版啊,有谁知道如何才能使用dropbear连到iLO的ssh吗?或者知道如何才能从路由连到iLO进行一些管理操作吗?


    ---

    解决方法:
    1. 安装Entware
    2. opkg安装openssh-client
  • k
    kingchy
    顶一个,有人知道如何解决吗?
  • C
    Cappuccin0
    治本的办法是在路由器上面对应的行从known_host里面删掉 然后重新ssh的时候就会提示是否把hostkey加进去和正常登录
    治标的办法是用-yy来强制跳过hostkey检查 注意是两个y
    1. ssh -yy admin@hostname
    复制代码
  • k
    kingchy
    回复3#妙药

    Mac上和路由上都分别测试了,还是不行。下面是路由上测试的结果:
    1. admin@RT-AC68U:/jffs/scripts# find / -name known*
    2. admin@RT-AC68U:/jffs/scripts# ssh Administrator@192.168.x.51

    3. Host '192.168.x.51' is not in the trusted hosts file.
    4. (ssh-rsa fingerprint sha1!! 19:eb:bd:26:d4:a4:91:5c:9e:55:d1:b1:00:cb:84:9c:67:3a:a4:xx)
    5. Do you want to continue connecting? (y/n) y

    6. ssh: Connection to Administrator@192.168.x.51:22 exited: Bad hostkey signature
    7. admin@RT-AC68U:/jffs/scripts# ssh -yy Administrator@192.168.x.51
    8. ssh: Caution, skipping hostkey check for 192.168.x.51


    9. ssh: Connection to Administrator@192.168.x.51:22 exited: Bad hostkey signature
    复制代码
  • k
    kingchy
    回复4#Cappuccin0

    看上面的结果。-yy也都试过的,还是不能连上去。
  • k
    kingchy
    Mac上的结果
    1. a@Apple $ cat ~/.ssh/known_hosts|grep "\.51"
    2. a@Apple $ dbclient -yy Administrator@192.168.x.51
    3. dbclient: Caution, skipping hostkey check for 192.168.x.51


    4. dbclient: Connection to Administrator@192.168.x.51:22 exited: Bad hostkey signature
    复制代码
  • C
    Cappuccin0
    回复6#kingchy
    擦 搜了下好像还真是已知问题https://github.com/ericpaulbishop/gargoyle/issues/363
    你的服务器或者客户端版本有可能升级或者降级么 iOS fly ~
  • k
    kingchy
    回复8#Cappuccin0


    服务器端恐怕升级不了,那是hp的ilo自带的ssh server。

    客户端升级有可能也不能解决问题。那篇文章我也看过,是15年的。路由上dropbear的版本是17年的,mac上是19年的,都有问题。

    能请您把您路由上的ssh客户端共享一下吗?或者您知道去哪里获得merlin的最新ssh客户端?
  • k
    kingchy
    从merlin下载了最新固件,提取了里面的dropbear,结果依旧:
    1. admin@RT-AC68U:/jffs/scripts# ./dropbearmulti ssh -V
    2. Dropbear v2019.78
    3. admin@RT-AC68U:/jffs/scripts# ./dropbearmulti ssh -yy administrator@192.168.x.51
    4. ssh: Caution, skipping hostkey check for 192.168.x.51


    5. ssh: Connection to administrator@192.168.x.51:22 exited: Bad hostkey signature
    复制代码
  • d
    dalinlyz
    还有空间就装个openssh-client呗
  • k
    kingchy
    回复11#dalinlyz


    opkg/ipkg都没有,看来得装个entware/optware了
  • k
    kingchy
    您知道有什么简便的方法可以安装openssh-client吗?
  • k
    kingchy
    最后通过安装entware,然后安装openssh-client的方式解决了这个问题。