sshnet / SSH.NET

SSH.NET is a Secure Shell (SSH) library for .NET, optimized for parallelism.
MIT License
3.87k stars 915 forks source link

Remove unnecessary DNS lookup in Connect #1412

Closed Rob-Hague closed 6 hours ago

Rob-Hague commented 3 weeks ago

The library currently performs a DNS lookup of the desired host, takes the first returned IP address and connects to that. Instead, we can just pass the hostname down to System.Net.Sockets which will do the right thing, potentially trying multiple addresses if needed.