Title: SocketException connecting to SFTP server: name is valid, but no data of the requested type was found
Tags: c#;.net;sockets;sftp;socketexception
Question: I am trying to connect my sftp server using SharpSsh library, but I'm getting following error:
System.Net.Sockets.SocketException (0x80004005):
The requested name is valid, but no data of the requested type was found
I am using following code for connection
Tamir.SharpSsh.Sftp sftp = new Tamir.SharpSsh.Sftp("ftp.simptr.us", "username", "password");
Why is this exception being thrown?


Here is another answer: This error message is associated with the Winsock WSANO_DATA error code. It means, there is some problem with DNS record of the domain name you are trying to connect to.
See also
https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2#WSANO_DATA
It is unlikely this is related to the SharpSsh library.
Try to telnet to verify, you should get the same error:
telnet ftp.simptr.us 22

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2013:00:03/06/13', 'FavoriteCount': 0.0, 'PostTypeId': 1, 'Tags': '<c#><.net><sockets><sftp><socketexception>', 'Title': 'SocketException connecting to SFTP server: name is valid, but no data of the requested type was found', 'ViewCount': 5396, 'id': 15260111, 'user_AboutMe': '<p>Software Engineer - Competitive Intelligence | E-Commerce | GIS | Process Automation</p>\n', 'user_AccountId': 1320705.0, 'user_DisplayName': 'Shoaib Ijaz', 'user_Reputation': 5043.0, 'user_Views': 594.0, 'user_id': 1558544.0}}