SocketException connecting to SFTP server: name is valid, but no data of the requested type was found

1

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?

c#
.net
sockets
sftp
socketexception
asked on Stack Overflow Mar 6, 2013 by Shoaib Ijaz • edited Apr 16, 2013 by Adam

1 Answer

1

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
answered on Stack Overflow Apr 16, 2013 by Martin Prikryl • edited Jul 12, 2019 by Martin Prikryl

User contributions licensed under CC BY-SA 3.0