TerminalStudio / dartssh2

SSH and SFTP client written in pure Dart, aiming to be feature-rich as well as easy to use.
https://pub.dev/packages/dartssh2
MIT License
215 stars 58 forks source link

No matching client MAC algorithm #72

Open ganeshchenniah opened 1 year ago

ganeshchenniah commented 1 year ago

Hi ,

I m getting the below error [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No matching client MAC algorithm

flutter: -> _SSHNativeSocket(192.168.0.14:22): SSH_Message_KexInit(kexAlgorithms: [curve25519-sha256@libssh.org, ecdh-sha2-nistp521, ecdh-sha2-nistp384, ecdh-sha2-nistp256, diffie-hellman-group-exchange-sha256, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha1, diffie-hellman-group1-sha1], serverHostKeyAlgorithms: [ssh-ed25519, rsa-sha2-512, rsa-sha2-256, ssh-rsa, ecdsa-sha2-nistp521, ecdsa-sha2-nistp384, ecdsa-sha2-nistp256], encryptionClientToServer: [aes128-ctr, aes128-cbc, aes256-ctr, aes256-cbc], encryptionServerToClient: [aes128-ctr, aes128-cbc, aes256-ctr, aes256-cbc], macClientToServer: [hmac-sha1, hmac-sha2-256, hmac-sha2-512, hmac-md5], macServerToClient: [hmac-sha1, hmac-sha2-256, hmac-sha2-512, hmac-md5], compressionClientToServer: [none], compressionServerToClient: [none], languagesClientToServer: [], languagesServerToClient: [], firstKexPacketFollows: false)

flutter: SSHTransport._processVersionExchange flutter: <- _SSHNativeSocket(192.168.0.14:22): SSH-2.0-OpenSSH_7.4 flutter: SSHTransport._remoteVersion = "SSH-2.0-OpenSSH_7.4" flutter: SSHTransport._processPackets flutter: SSHTransport._consumeClearTextPacket flutter: SSHTransport._handleMessageKexInit flutter: <- _SSHNativeSocket(192.168.0.14:22): SSH_Message_KexInit(kexAlgorithms: [curve25519-sha256@libssh.org, curve25519-sha256, diffie-hellman-group18-sha512, diffie-hellman-group16-sha512, diffie-hellman-group14-sha256, diffie-hellman-group-exchange-sha256], serverHostKeyAlgorithms: [ssh-ed25519], encryptionClientToServer: [chacha20-poly1305@openssh.com, aes256-gcm@openssh.com, aes128-gcm@openssh.com, aes256-ctr, aes192-ctr, aes128-ctr], encryptionServerToClient: [chacha20-poly1305@openssh.com, aes256-gcm@openssh.com, aes128-gcm@openssh.com, aes256-ctr, aes192-ctr, aes128-ctr], macClientToServer: [hmac-sha2-512-etm@openssh.com, hmac-sha2-256-etm@openssh.com, umac-128-etm@openssh.com], macServerToClient: [hmac-sha2-512-etm@openssh.com, hmac-sha2-256-etm@openssh.com, umac-128-etm@openssh.com], compressionClientToServer: [none, zlib@openssh.com], compressionServerToClient: [none, zlib@openssh.com], languagesClientToServer: [], languagesServerToClient: [], firstKexPacketFollows: false) [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No matching client MAC algorithm

0 SSHTransport._handleMessageKexInit (package:dartssh2/src/ssh_transport.dart:701:7)

1 SSHTransport._handleMessage (package:dartssh2/src/ssh_transport.dart:639:16)

2 SSHTransport._processPackets (package:dartssh2/src/ssh_transport.dart:319:7)

3 SSHTransport._processVersionExchange (package:dartssh2/src/ssh_transport.dart:302:5)

4 SSHTransport._processData (package:dartssh2/src/ssh_transport.dart:259:7)

5 SSHTransport._onSocketData (package:dartssh2/src/ssh_transport.dart:239:7)

6 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)

7 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)

8 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)

9 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)

10 _StreamController._add (dart:async/stream_controller.dart:648:7)

11 _StreamController.add (dart:async/stream_controller.dart:596:5)

12 _Socket._onData (dart:io-patch/socket_patch.dart:2355:41)

13 _RootZone.runUnaryGuarded (dart:async/zone.dart:1593:10)

14 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)

15 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)

16 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)

17 _StreamController._add (dart:async/stream_controller.dart:648:7)

18 _StreamController.add (dart:async/stream_controller.dart:596:5)

19 new _RawSocket. (dart:io-patch/socket_patch.dart:1877:33)

20 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1334:14)

21 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)

22 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

flutter: SSHTransport._onSocketDone flutter: SSHTransport.close flutter: SSHClient._onTransportClosed flutter: SSHTransport.closeWithError SSHAuthAbortError(Connection closed before authentication) flutter: exception SSHAuthAbortError(Connection closed before authentication)

Please let me know how to resolve the issue .

I-Want-ToBelieve commented 6 months ago

Does anyone know why this is?

I-Want-ToBelieve commented 5 months ago

https://stackoverflow.com/questions/51501496/how-to-resolve-no-matching-mac-found-error-when-i-try-to-ssh