Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH CONNECTION CLOSE - Error: Handshake failed: no matching client #8

Closed
hktalent opened this issue Feb 16, 2017 · 1 comment
Closed

Comments

@hktalent
Copy link

hktalent commented Feb 16, 2017

client os

mac 10.12.3
uname -a
Darwin QQ1160.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64

1.safari ver 10.0.3 (12602.4.8)

http://localhost:2222/ssh/host/192.168.10.243

2.server: name -a

Linux kali 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux

3.error

kali linux out error
SSH CONNECTION CLOSE - Error: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESET CREDENTIALS

in chrome 56.0.2924.87 (64-bit)
SSH CONNECTION CLOSE - Error: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipher CREDENTIALS

node index.js

console

webssh2 Login: user=root from=127.0.0.1 host=192.168.10.243 port=22 sessionID=undefined allowreplay=undefined
Headers: {"host":"localhost:2222","connection":"keep-alive","cache-control":"max-age=0","authorization":"Basic cm9vdDpaMnpvTzAxSXxsNmI5UUdTNSo=","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8","dnt":"1","accept-encoding":"gzip, deflate, sdch, br","accept-language":"zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4","cookie":"BEEFSESSION=53d7360526c8a0cc2ae71c1789503db1167fe02928db3fc51bd2668fbcd0bb721f66a20ae887275e81beaf3c661c0e0938ead29ad3a77e1abaecf121c30341cf37b3519a318bd52a8dff5be6f81d5370; _dradis_session=bjl0N29OeTRRRzBVQmZhYzNlSi92ZjBiWGhEaHdXUVNzdFdydWJ1SHU1cEUwSHRqbTh1bThEZkJjNjBhMlZrWWZRSUtzZjNsaDZjRml1RnZyRkhrSG1HNldSM3AyeThUWnZBN1E2RVM3T2E1Z1JDbW1Na1pWakdmUEV4UHhoa3lGRDI5NGp0TUE3MDl1bHRXdm8yc0ZvQk01MFpTbkxJUFFkdnUxeG5Db0x0NUdNM2FGRkJMREc1aFd0KzRXaXd1WGJZZ2gvSEZYei9yY3EwNU5HN2hiNkxFS0ZyenJWQmM5MlZSazZRUWJ5WGw0OGxTOVFKZnd3ZVJQcUwwbUx0NHN2M2h6cjJWTnNzUHFWOHFjQ0g4TEE9PS0tdXAyd2psV0lHNTNZM0t6bnUrZTNUdz09--c77e8fdc45cc737c846c1c3cc25d8cbd5b08b5ad; io=XedVUh8QMvag1pcmAAAH","if-none-match":"W/\"298-15a280f3268\"","if-modified-since":"Fri, 10 Feb 2017 12:46:09 GMT"}
on.error - Error: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipher
webssh2 Login: user=root from=127.0.0.1 host=192.168.10.243 port=22 sessionID=undefined allowreplay=undefined
Headers: {"host":"localhost:2222","cookie":"io=Hhuu5qJYkuv6tFl0AAAC","authorization":"Basic cm9vdDpaMnpvTzAxSXxsNmI5UUdTNSo=","connection":"keep-alive","upgrade-insecure-requests":"1","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8","accept-language":"zh-cn","cache-control":"max-age=0","accept-encoding":"gzip, deflate"}
on.error - Error: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: read ECONNRESETError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipherError: Handshake failed: no matching client->server cipher

#kali linux
uname -a
Linux kali 4.6.0-kali1-amd64 #1 SMP Debian 4.6.4-1kali1 (2016-07-21) x86_64 GNU/Linux

other linux is ok

uname -a
Linux appserver 2.6.32-279.el6.x86_64 #1 SMP Thu Jun 21 15:00:18 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

@billchurch
Copy link
Owner

billchurch commented Feb 16, 2017

Seems like what ever cipher your server is negotiating is not available on the client. You can set cipher strings on the .connect event in index.js file around line 125-129. master branch has these set to work with some Cisco routers that have trouble negotiating higher cipher strengths. exec-test branch has this commented out.

This is not as much an issue with WebSSH2 as it is providing the proper cipher strings to pass to the ssh2 module by @mscdex

Check out that page for the proper cipher settings. You can also enable debug mode in both your sshd on the server side as well as ssh2 here by adding a debug function to the .connect event in index.js.

    }).connect({
        host: config.ssh.host,
        port: config.ssh.port,
        username: config.user.name,
        password: config.user.password,
        debug: console.log,
        tryKeyboard: true
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants