Topic "Unable to connect to IIS7 SFTP"

Author Message
Handleman

Guest


I am successfully using WinSCP command line from inside a .net application (via instructions on this site), to connect to an SFTP server running IIS7.
I'm having trouble downloading content from directories with extended properties.
I am trying to ensure that UTF-8 is on to see if this solves the issue.
It seems the only way to set this for the command line version is via a saved session.
I am having trouble creating a saved session (using the WinSCP GUI version) because I cannot connect to the server (which is strange because the command line version can).
Here is a log file from the GUI version

. 2011-02-15 12:39:52.467 WinSCP Version 4.2.9 (Build 938) (OS 6.1.7600)
. 2011-02-15 12:39:52.467 Login time: Tuesday, 15 February 2011 12:39:52 PM
. 2011-02-15 12:39:52.467 --------------------------------------------------------------------------

. 2011-02-15 12:39:52.467 Session name: ftp.gdn.ubeetech.com
. 2011-02-15 12:39:52.467 Host name: ftp.gdn.ubeetech.com (Port: 21)
. 2011-02-15 12:39:52.468 User name: ftp.gdn.ubeetech.com|UBEE-GDN-01\GDNUser (Password: Yes, Key fi
le: Yes)
. 2011-02-15 12:39:52.468 Tunnel: No
. 2011-02-15 12:39:52.468 Transfer Protocol: SFTP
. 2011-02-15 12:39:52.468 Ping type: C, Ping interval: 30 sec; Timeout: 60 sec
. 2011-02-15 12:39:52.468 Proxy: none
. 2011-02-15 12:39:52.468 SSH protocol version: 2; Compression: No
. 2011-02-15 12:39:52.468 Bypass authentication: No
. 2011-02-15 12:39:52.468 Try agent: No; Agent forwarding: No; TIS/CryptoCard: No; KI: No; GSSAPI: Y
es
. 2011-02-15 12:39:52.468 GSSAPI: Forwarding: No; Server realm:
. 2011-02-15 12:39:52.468 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-02-15 12:39:52.468 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-02-15 12:39:52.468 SFTP Bugs: -,-
. 2011-02-15 12:39:52.468 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-02-15 12:39:52.468 Shell: default
. 2011-02-15 12:39:52.468 EOL: 0, UTF: 1
. 2011-02-15 12:39:52.468 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-02-15 12:39:52.468 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-02-15 12:39:52.469 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-02-15 12:39:52.469 Cache directory changes: Yes, Permanent: Yes
. 2011-02-15 12:39:52.469 DST mode: 1
. 2011-02-15 12:39:52.469 --------------------------------------------------------------------------

. 2011-02-15 12:39:52.527 Looking up host "ftp.gdn.ubeetech.com"
. 2011-02-15 12:39:52.528 Connecting to 10.1.1.41 port 21
. 2011-02-15 12:39:52.535 Selecting events 63 for socket 992
. 2011-02-15 12:39:52.538 Waiting for the server to continue with the initialisation
. 2011-02-15 12:39:52.544 Looking for incoming data
. 2011-02-15 12:39:52.545 Looking for network events
. 2011-02-15 12:39:52.545 Detected network event
. 2011-02-15 12:39:52.545 Enumerating network events for socket 992
. 2011-02-15 12:39:52.545 Enumerated 18 network events making 18 cumulative events for socket 992
. 2011-02-15 12:39:52.545 Handling network write event on socket 992 with error 0
. 2011-02-15 12:39:52.545 Handling network connect event on socket 992 with error 0
. 2011-02-15 12:39:52.545 Looking for network events
. 2011-02-15 12:39:52.545 Detected network event
. 2011-02-15 12:39:52.545 Enumerating network events for socket 992
. 2011-02-15 12:39:52.545 Enumerated 1 network events making 1 cumulative events for socket 992
. 2011-02-15 12:39:52.545 Handling network read event on socket 992 with error 0
. 2011-02-15 12:39:52.545 Waiting for the server to continue with the initialisation
. 2011-02-15 12:39:52.545 Looking for incoming data
. 2011-02-15 12:39:52.545 Looking for network events
. 2011-02-15 12:40:29.741 Detected network event
. 2011-02-15 12:40:29.742 Enumerating network events for socket 992
. 2011-02-15 12:40:29.742 Enumerated 32 network events making 32 cumulative events for socket 992
. 2011-02-15 12:40:29.742 Handling network close event on socket 992 with error 10053
. 2011-02-15 12:40:29.742 Selecting events 0 for socket 992
. 2011-02-15 12:40:29.742 Network error: Software caused connection abort
* 2011-02-15 12:40:29.754 (ESshFatal) Network error: Software caused connection abort


Any ideas?

Thanks.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Can you post a log file for case, when it works?
_________________
Martin Prikryl
Handleman

Guest


Thanks for you time.

I can only get it working from the command line - can I log the command line version? how do I do that?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Use /log switch.
https://winscp.net/eng/docs/commandline
Handleman

Guest


Thanks again for your help.
Log this activity made me realise that I was not correctly connecting using sftp on the command line version. So now I cannot connect with either the GUI or command line versions to our SFTP server hosted under IIS (but can connect with filezilla).

Do you have any suggestions for what we are doing wrong?

Below is the log file from the command line version (using SFTP and failing).

. 2011-02-22 15:40:42.344 WinSCP Version 4.2.9 (Build 938) (OS 5.1.2600 Service Pack 3)
. 2011-02-22 15:40:42.344 Login time: Tuesday, 22 February 2011 3:40:42 PM
. 2011-02-22 15:40:42.344 --------------------------------------------------------------------------
. 2011-02-22 15:40:42.344 Session name: sftp
. 2011-02-22 15:40:42.344 Host name: sftp (Port: 21)
. 2011-02-22 15:40:42.344 User name: (Password: No, Key file: No)
. 2011-02-22 15:40:42.344 Tunnel: No
. 2011-02-22 15:40:42.344 Transfer Protocol: FTP
. 2011-02-22 15:40:42.344 Ping type: C, Ping interval: 30 sec; Timeout: 15 sec
. 2011-02-22 15:40:42.344 Proxy: none
. 2011-02-22 15:40:42.344 FTP: FTPS: Explicit SSL; Passive: No [Force IP: No]
. 2011-02-22 15:40:42.344 Local directory: default, Remote directory: //ftp.gdn.ubeetech.com|UBEE-GDN-01\GDNUser:password@sftp://ftp.gdn.ubeetech.com:21, Update: No, Cache: Yes
. 2011-02-22 15:40:42.344 Cache directory changes: Yes, Permanent: Yes
. 2011-02-22 15:40:42.344 DST mode: 1
. 2011-02-22 15:40:42.344 --------------------------------------------------------------------------
. 2011-02-22 15:40:42.344 Username prompt (no username provided)
. 2011-02-22 15:40:42.376 Password prompt (no password provided or last login attempt failed)
. 2011-02-22 15:40:42.391 Connecting to sftp ...
. 2011-02-22 15:40:44.657 The requested address is not valid in its context.
. 2011-02-22 15:40:44.657 Connection failed.
. 2011-02-22 15:43:54.131 --------------------------------------------------------------------------
. 2011-02-22 15:43:54.131 WinSCP Version 4.2.9 (Build 938) (OS 5.1.2600 Service Pack 3)
. 2011-02-22 15:43:54.131 Login time: Tuesday, 22 February 2011 3:43:54 PM
. 2011-02-22 15:43:54.131 --------------------------------------------------------------------------
. 2011-02-22 15:43:54.131 Session name: ftp.gdn.ubeetech.com|UBEE-GDN-01\GDNUser@ftp.gdn.ubeetech.com
. 2011-02-22 15:43:54.131 Host name: ftp.gdn.ubeetech.com (Port: 21)
. 2011-02-22 15:43:54.131 User name: ftp.gdn.ubeetech.com|UBEE-GDN-01\GDNUser (Password: Yes, Key file: No)
. 2011-02-22 15:43:54.131 Tunnel: No
. 2011-02-22 15:43:54.131 Transfer Protocol: SFTP
. 2011-02-22 15:43:54.131 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2011-02-22 15:43:54.131 Proxy: none
. 2011-02-22 15:43:54.131 SSH protocol version: 2; Compression: No
. 2011-02-22 15:43:54.131 Bypass authentication: No
. 2011-02-22 15:43:54.131 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2011-02-22 15:43:54.146 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-02-22 15:43:54.146 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-02-22 15:43:54.146 SFTP Bugs: -,-
. 2011-02-22 15:43:54.146 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-02-22 15:43:54.146 Shell: default
. 2011-02-22 15:43:54.146 EOL: 0, UTF: 2
. 2011-02-22 15:43:54.146 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-02-22 15:43:54.146 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-02-22 15:43:54.146 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-02-22 15:43:54.146 Cache directory changes: Yes, Permanent: Yes
. 2011-02-22 15:43:54.146 DST mode: 1
. 2011-02-22 15:43:54.146 --------------------------------------------------------------------------
. 2011-02-22 15:43:54.177 Looking up host "ftp.gdn.ubeetech.com"
. 2011-02-22 15:43:54.177 Connecting to 10.1.1.41 port 21
. 2011-02-22 15:44:09.178 Waiting for data timed out, asking user what to do.
. 2011-02-22 15:44:09.178 Asking user:
. 2011-02-22 15:44:09.178 Host is not communicating for 15 seconds.
. 2011-02-22 15:44:09.178
. 2011-02-22 15:44:09.178 Wait for another 15 seconds? ()
. 2011-02-22 15:44:09.178 Attempt to close connection due to fatal exception:
* 2011-02-22 15:44:09.178 Terminated by user.
. 2011-02-22 15:44:09.178 Closing connection.
. 2011-02-22 15:44:09.178 Sending special code: 12
special code: 12
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Actually, realizing what you are trying to do, I do not think there's SFTP in IIS. Unless it was added on some recent version.
_________________
Martin Prikryl
Handleman

Guest


IIS7 does have SFTP, I can connect to it via Filezilla.

I may be mis-understanding SFTP as I have read some wikipedia pages that have not made it any clearer.

Can I ask, if I am using WinSCP, is the communication secure if the protocol is FTP or only if the protocol is SFTP. The log examples I have included above have
2011-02-22 15:40:42.344 Transfer Protocol: FTP
and
2011-02-15 12:39:52.468 Transfer Protocol: SFTP

Does it need to be SFTP to be secure, or is the security provided by the SSH connection for the FTP protocol?

Thanks.
Handleman

Guest


Using Filezilla to connect to IIS7 SFTP the server type needs to be set to "FTPES - FTP over explicit TLF/SSL". Maybe you are right, this is not SFTP and I cannot use WinSCP to connect?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Handleman wrote:
Using Filezilla to connect to IIS7 SFTP the server type needs to be set to "FTPES - FTP over explicit TLF/SSL". Maybe you are right, this is not SFTP and I cannot use WinSCP to connect?

WinSCP also supports FTP with explicit TLS/SSL encryption.
_________________
Martin Prikryl
Handleman

Guest


Thanks for all your help, I have managed to resolve my connectivity issue - I should have specified FTP over SSL in WinSCP GUI.

I now WinSCP connecting over the command line using a saved session.

I am still having trouble reading directories with high-ascii chars, but I suspect this is an encoding issue in my C# application (that is calling WinSCP via the command line).

I might lodge another post about this issue.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Handleman wrote:
I am still having trouble reading directories with high-ascii chars, but I suspect this is an encoding issue in my C# application (that is calling WinSCP via the command line).

It may be worth checking https://winscp.net/eng/docs/faq_utf8
_________________
Martin Prikryl
gob

Guest


I think you are confusing SFTP with FTPS.
IIS7 does not support SFTP per Microsoft website:

https://www.iis.net/learn/get-started/whats-new-in-iis-7/what39s-new-for-microsoft-and-ftp-in-iis-7

"The industry has addressed how to secure FTP traffic in several different ways. Although there no single standard has emerged, there are two similarly named protocols: FTPS and SFTP. To clarify, Microsoft offers an FTP over SSL (FTPS) solution. Microsoft currently does not provide a solution for securing FTP traffic using FTP over SSH (SFTP)."
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License