SFTP: Browsing Folders Fails Due to Colons (:) Being Inserted in Path

SFTP: Browsing Folders Fails Due to Colons (:) Being Inserted in Path

avatar

Hey Guys -

Running 2020.2.13.0 x64 and having issues connecting to SFTP servers. I'm able to connect without issue and see root directory, but am unable to enter other directories. When I turned on logging, I see that colons are being inserted into their names after the first character. Below is a log from when I connected to a server then tried entering a folder named "downloads" followed by one named "logs." (see last 4 lines) Only settings I made to session were hostname, username, & password - the rest are defaults. Connection works just fine using WinSCP.

Any suggestions or is this a bug? Thanks!

[6/16/2020 11:30:24 AM] Connected to a windows server
[6/16/2020 11:30:24 AM] Sending session channel open request: 0/-
[6/16/2020 11:30:24 AM] Received channel open confirmation: 0/1 WS 200000/0 MPS 32000/32768
[6/16/2020 11:30:24 AM] Sending subsystem request: 0/1 sftp
[6/16/2020 11:30:24 AM] Received channel success: 0/1
[6/16/2020 11:30:24 AM] -> sftp init request
[6/16/2020 11:30:24 AM] <- version reply
[6/16/2020 11:30:24 AM] -> real path request: .
[6/16/2020 11:30:24 AM] <- name reply
[6/16/2020 11:30:24 AM] -> open dir request: /
[6/16/2020 11:30:25 AM] <- handle reply
[6/16/2020 11:30:25 AM] -> read dir request
[6/16/2020 11:30:25 AM] -> read dir request
[6/16/2020 11:30:25 AM] <- name reply
[6/16/2020 11:30:25 AM] -> read dir request
[6/16/2020 11:30:25 AM] <- status reply: eof
[6/16/2020 11:30:25 AM] <- status reply: eof
[6/16/2020 11:30:25 AM] -> close handle request
[6/16/2020 11:30:25 AM] <- status reply: ok
[6/16/2020 11:30:30 AM] -> open dir request: d:ownloads
[6/16/2020 11:30:30 AM] <- status reply: no such file
[6/16/2020 11:30:33 AM] -> open dir request: l:og
[6/16/2020 11:30:34 AM] <- status reply: no such file

All Comments (3)

avatar

This looks like a bug. It seems like the SFTP client believes it is connecting to a windows server, thus the added colons. I suppose it is not the case. The detection is done by executing the command:

echo %cd%

Could you SSH to this server and tell me what is the output of this command? This will help me adjust the auto detection algorithm.

Regards

Denis Vincent

avatar

Thanks for the reply. Unfortunately, I only have SFTP access to the remote host, so can't SSH (tried & failed). Was able to get a bit of host information via WinSCP, though; which is below. Hope it helps...

File transfer protocol = SFTP-3
Cryptographic protocol = SSH-2
SSH implementation = OpenSSH_6.7p1 Debian-5+deb8u8
Encryption algorithm = AES-256 SDCTR (AES-NI accelerated)
Compression = No
------------------------------------------------------------
Additional information
The server supports these SFTP extensions:
posix-rename@openssh.com="1"
statvfs@openssh.com="2"
fstatvfs@openssh.com="2"
hardlink@openssh.com="1"
fsync@openssh.com="1"
------------------------------------------------------------

Thanks!

avatar

Thanks for the info. This could prove to be useful. We have also decided to add an option to disable the auto detection and force to use either unix like or windows commands/paths. This will surely provide a solution for this problem.

Regards,

Denis Vincent