Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Renci.SshNet/Security/KeyExchange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ public virtual void Start(Session session, KeyExchangeInitMessage message)
{
Session = session;

SendMessage(session.ClientInitMessage);

// Determine encryption algorithm
var clientEncryptionAlgorithmName = (from b in session.ConnectionInfo.Encryptions.Keys
from a in message.EncryptionAlgorithmsClientToServer
Expand Down
4 changes: 4 additions & 0 deletions src/Renci.SshNet/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ public void Connect()
// Start incoming request listener
ThreadAbstraction.ExecuteThread(() => MessageListener());

// Send SSH_MSG_KEXINIT. There is no need to await SSH_MSG_KEXINIT from the server
// Cisco switches can await SSH_MSG_KEXINIT from the client for no reason before sending it
SendMessage(ClientInitMessage);

// Wait for key exchange to be completed
WaitOnHandle(_keyExchangeCompletedWaitHandle);

Expand Down