10.2的ssh连接不上,n种方法已经试过,求大神支招

使用的是yalu B7越狱的,知道自带dropbear,所以没有安装openSSH,我通过SSH连接的时候,会报错

ssh_exchange_identification: Connection closed by remote host

网上查了一堆资料,都没用,但是重启手机然后再使用yalu越狱,就可以连接,但是会自动,再连接就又报上面的错误了.

在github上看到有人说dropbear本来就是有超时设置的,会自动断开,但是断开归断开,为啥我重新连接就不行了啊,我通过

launchctl load /Library/LaunchDaemons/dropbear.plist

想重新加载,但是提示我已经加载了,这个方法也不行

在论坛中看到有人说用

/usr/bin/beardrop  -F -R -p 22

但是也不行(上面的命令我记不太清了,按记忆写的,输的时候肯定是对的)

修改plist文件的做法,我的yalu目录下没有beardrop.plist,在Library/LaunchDaemons/目录下倒是有Plist文件,我看了一下,里面的item4是写的22,所以不必修改

以上就是我自己找的方法,但是都没有什么效果
我通过3v命令将SSH日志打印了出来,但是能力有限,看不太懂,不知道哪出错的,求大神帮忙分析一下!万分感谢

OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /Users/jj/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolving "192.168.0.107" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.0.107 [192.168.0.107] port 22.
debug1: Connection established.
debug1: identity file /Users/jj/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jj/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version dropbear_2015.71
debug1: no match: dropbear_2015.71
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.0.107:22 as 'root'
debug3: hostkeys_foreach: reading file "/Users/jj/.ssh/known_hosts"
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,kexguess2@matt.ucc.asn.au
debug2: host key algorithms: ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
debug2: ciphers ctos: aes128-ctr,aes256-ctr,aes128-cbc,aes256-cbc,twofish256-cbc,twofish-cbc,twofish128-cbc,3des-ctr,3des-cbc
debug2: ciphers stoc: aes128-ctr,aes256-ctr,aes128-cbc,aes256-cbc,twofish256-cbc,twofish-cbc,twofish128-cbc,3des-ctr,3des-cbc
debug2: MACs ctos: hmac-sha1-96,hmac-sha1,hmac-sha2-256,hmac-sha2-512,hmac-md5
debug2: MACs stoc: hmac-sha1-96,hmac-sha1,hmac-sha2-256,hmac-sha2-512,hmac-md5
debug2: compression ctos: zlib@openssh.com,none
debug2: compression stoc: zlib@openssh.com,none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp521
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 192.168.0.107 port 22

注:USB和WIFI都连接不上

我之前也遇到过 后来把链接IP改成127.0.0.1就可以用usb链接了

额,我试了下改127,貌似还是连不上!

有安装openssh吗 如果有 卸载掉

刚越狱的时候是有安装,但是安装了就导致根本连不上,所以就卸载了,卸载后可以连接,但是就有我上面说到的问题了,过会就连不上了,目前我只能重启!重启后能管多久我也没测,反正会失效连不上!

你把dropbear.plist里的参数改成127.0.0.1:22试试

正解应该是:修改127.0.0.1:22改为22 然后删除openssh

我这边是修改成22,删不删除都可以连上。

1.卸载手机上的OpenSSL和Openssh

2.添加源:http://cydia.ichitaso.com/test

3.进入上面这个源里重新下载:dropbear

4.安装完毕,执行ssh root@deviceIP,默认密码为alpine(也可以在iPhone里下载ssh软件进行连接测试)

参考教程:https://www.reddit.com/r/jailbreak/comments/7oj564/tutorial_how_to_access_ssh_using_dropbear_in_ios/

5.成功后,再重新安装openssh和OpenSSL了(经测试不会影响SSH连接iPhone)。

你试过这个方法吗?我是这么成功的

nice 赞一个