SFTP question

May 20, 2008
11,380
98
Syracuse, NY, USA
I do this, apparently successfully.
Code:
v:\> iftp /v sftp://vefatica:********@vefatica.net

v:\> iftp
vefatica.net/H:/anonymous/
The server's log shows
Code:
[02] Tue 24Oct17 19:31:56 - (000008) Connected to 72.230.84.150 (local address 72.230.84.150, port 22)
[03] Tue 24Oct17 19:31:56 - (000008) IP-Name: zz.twcny.rr.com (72.230.84.150)
[02] Tue 24Oct17 19:31:56 - (000008) User "vefatica" logged in

But I can't do anything
Code:
v:\> dir sftp:

TCC: (Sys) The system cannot find the file specified.
 "sftp:/H:/anonymous/"
                   0 bytes in 0 files and 0 dirs

The directory exists and is not empty. Am I missing something?
 
May 20, 2008
11,380
98
Syracuse, NY, USA
It is in sharp contrast to FTP.
Code:
v:\> iftp ftp://vefatica:********@vefatica.net

v:\> iftp
vefatica.net/H:/anonymous

v:\> dir ftp:

 Directory of  ftp://vefatica.net/H:/anonymous/*

2017-08-14  23:35         <DIR>    .
2017-08-14  23:35         <DIR>    ..
2017-10-18  00:44         <DIR>    4plugins
2017-07-21  03:20         <DIR>    pmaddons
2014-08-08  00:00       3,657,325  arnex4.JPG
2012-07-17  00:00         109,138  MercOnSvcDesk.png
           3,766,463 bytes in 2 files and 4 dirs
 
May 20, 2008
11,380
98
Syracuse, NY, USA
Here's a detailed server log of the failed "dir sftp:".
Code:
[30] Tue 24Oct17 19:54:15 - (000015) SSH2_MSG_USERAUTH_REQUEST: user: vefatica; service: ssh-connection; type: none
[31] Tue 24Oct17 19:54:15 - (000015) SSH2_MSG_USERAUTH_FAILURE: login failed
[30] Tue 24Oct17 19:54:15 - (000015) SSH2_MSG_USERAUTH_REQUEST: user: vefatica; service: ssh-connection; type: password
[02] Tue 24Oct17 19:54:15 - (000015) User "vefatica" logged in
[31] Tue 24Oct17 19:54:15 - (000015) SSH2_MSG_USERAUTH_SUCCESS: successful login
[30] Tue 24Oct17 19:54:15 - (000015) SSH_FXP_INIT: client version 3 (IP*Works! SSH Client 2016)
[31] Tue 24Oct17 19:54:15 - (000015) SSH_FXP_VERSION: server version 3
[30] Tue 24Oct17 19:54:15 - (000015) {0x00000001} SSH_FXP_REALPATH: path: "/H:/anonymous"
[31] Tue 24Oct17 19:54:15 - (000015) {0x00000001} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 19:54:15 - (000015) {0x00000002} SSH_FXP_REALPATH: path: "/H:/anonymous/"
[31] Tue 24Oct17 19:54:15 - (000015) {0x00000002} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 19:54:29 - (000015) {0x00000003} SSH_FXP_REALPATH: path: "/H:/anonymous"
[31] Tue 24Oct17 19:54:29 - (000015) {0x00000003} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 19:54:29 - (000015) {0x00000004} SSH_FXP_OPENDIR: path: "/H:/anonymous"
[31] Tue 24Oct17 19:54:29 - (000015) {0x00000004} SSH_FXP_HANDLE: directory handle: 0x00000000
[32] Tue 24Oct17 19:54:29 - (000015) {0x00000005} SSH_FXP_READDIR: handle: 0x00000000
[33] Tue 24Oct17 19:54:29 - (000015) {0x00000005} SSH_FXP_NAME: found 4 items
[32] Tue 24Oct17 19:54:29 - (000015) {0x00000006} SSH_FXP_READDIR: handle: 0x00000000
[31] Tue 24Oct17 19:54:29 - (000015) {0x00000006} SSH_FX_EOF: End of file.
[30] Tue 24Oct17 19:54:29 - (000015) {0x00000007} SSH_FXP_CLOSE: handle: 0x00000000
[31] Tue 24Oct17 19:54:29 - (000015) {0x00000007} SSH_FX_OK: Success.
[30] Tue 24Oct17 19:54:29 - (000015) {0x00000008} SSH_FXP_REALPATH: path: "/H:/anonymous/"
[31] Tue 24Oct17 19:54:29 - (000015) {0x00000008} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 19:54:29 - (000015) {0x00000009} SSH_FXP_REALPATH: path: "/H:/anonymous"
[31] Tue 24Oct17 19:54:29 - (000015) {0x00000009} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 19:54:29 - (000015) {0x0000000a} SSH_FXP_OPENDIR: path: "/H:/anonymous"
[31] Tue 24Oct17 19:54:29 - (000015) {0x0000000a} SSH_FXP_HANDLE: directory handle: 0x00000001
[32] Tue 24Oct17 19:54:29 - (000015) {0x0000000b} SSH_FXP_READDIR: handle: 0x00000001
[33] Tue 24Oct17 19:54:29 - (000015) {0x0000000b} SSH_FXP_NAME: found 4 items
[32] Tue 24Oct17 19:54:29 - (000015) {0x0000000c} SSH_FXP_READDIR: handle: 0x00000001
[31] Tue 24Oct17 19:54:29 - (000015) {0x0000000c} SSH_FX_EOF: End of file.
[30] Tue 24Oct17 19:54:29 - (000015) {0x0000000d} SSH_FXP_CLOSE: handle: 0x00000001
[31] Tue 24Oct17 19:54:29 - (000015) {0x0000000d} SSH_FX_OK: Success.
[30] Tue 24Oct17 19:54:29 - (000015) {0x0000000e} SSH_FXP_REALPATH: path: "/H:/anonymous/"
 
May 20, 2008
11,380
98
Syracuse, NY, USA
It works with Putty's PSFTP.EXE. Here's the session, below that the server's log of the session.
Code:
v:\> g:\Putty\PSFTP.EXE vefatica.net
login as: vefatica
vefatica@vefatica.net's password:
Remote working directory is /H:/anonymous
psftp> dir
Listing directory /H:/anonymous
drwxrwxrwx   1 user     group           0 Oct 18 04:44 4plugins
-rw-rw-rw-   1 user     group      109138 Jul 17  2012 MercOnSvcDesk.png
-rw-rw-rw-   1 user     group     3657325 Aug  8  2014 arnex4.JPG
drwxrwxrwx   1 user     group           0 Jul 21 07:20 pmaddons
psftp> bye

v:\> g:\Putty\PSFTP.EXE vefatica.net
login as: vefatica
vefatica@vefatica.net's password:
Remote working directory is /H:/anonymous
psftp> dir
Listing directory /H:/anonymous
drwxrwxrwx   1 user     group           0 Oct 18 04:44 4plugins
-rw-rw-rw-   1 user     group      109138 Jul 17  2012 MercOnSvcDesk.png
-rw-rw-rw-   1 user     group     3657325 Aug  8  2014 arnex4.JPG
drwxrwxrwx   1 user     group           0 Jul 21 07:20 pmaddons
psftp> bye
Code:
[02] Tue 24Oct17 20:07:34 - (000019) Connected to 72.230.84.150 (local address 72.230.84.150, port 22)
[03] Tue 24Oct17 20:07:34 - (000019) IP-Name: zz.twcny.rr.com (72.230.84.150)
[30] Tue 24Oct17 20:07:39 - (000019) SSH2_MSG_USERAUTH_REQUEST: user: vefatica; service: ssh-connection; type: none
[31] Tue 24Oct17 20:07:39 - (000019) SSH2_MSG_USERAUTH_FAILURE: login failed
[32] Tue 24Oct17 20:07:42 - (000019) SSH_MSG_IGNORE: bytes received: 192; uncompressed bytes: 348
[30] Tue 24Oct17 20:07:42 - (000019) SSH2_MSG_USERAUTH_REQUEST: user: vefatica; service: ssh-connection; type: password
[02] Tue 24Oct17 20:07:42 - (000019) User "vefatica" logged in
[31] Tue 24Oct17 20:07:42 - (000019) SSH2_MSG_USERAUTH_SUCCESS: successful login
[30] Tue 24Oct17 20:07:42 - (000019) SSH_FXP_INIT: client version 3 (PuTTY_Release_0.67)
[31] Tue 24Oct17 20:07:42 - (000019) SSH_FXP_VERSION: server version 3
[30] Tue 24Oct17 20:07:42 - (000019) {0x00000100} SSH_FXP_REALPATH: path: "."
[31] Tue 24Oct17 20:07:42 - (000019) {0x00000100} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_REALPATH: path: "/H:/anonymous/."
[31] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_NAME: path: "/H:/anonymous"
[30] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_OPENDIR: path: "/H:/anonymous"
[31] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_HANDLE: directory handle: 0x00000000
[32] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_READDIR: handle: 0x00000000
[33] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_NAME: found 4 items
[32] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_READDIR: handle: 0x00000000
[31] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FX_EOF: End of file.
[30] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FXP_CLOSE: handle: 0x00000000
[31] Tue 24Oct17 20:07:59 - (000019) {0x00000100} SSH_FX_OK: Success.
[02] Tue 24Oct17 20:08:46 - (000019) Closed session
[02] Tue 24Oct17 20:08:46 - (000019) User "vefatica" logged out
 
May 20, 2008
11,380
98
Syracuse, NY, USA
As I said before, it's OK with FTP but not with SFTP.
Code:
v:\> iftp ftp://vefatica:********@vefatica.net

v:\> iftp
vefatica.net/H:/anonymous

v:\> dir ftp:

 Directory of  ftp://vefatica.net/H:/anonymous/*

2017-08-14  23:35         <DIR>    .
2017-08-14  23:35         <DIR>    ..
2017-10-18  00:44         <DIR>    4plugins
2017-07-21  03:20         <DIR>    pmaddons
2014-08-08  00:00       3,657,325  arnex4.JPG
2012-07-17  00:00         109,138  MercOnSvcDesk.png
           3,766,463 bytes in 2 files and 4 dirs
 
May 20, 2008
11,380
98
Syracuse, NY, USA
I dunno! It's Serv-U, a pretty mature product. What is the standard format?

The DIR part is better, but this COPY fails sometimes.
Code:
v:\> iftp sftp://rexconn:*************@vefatica.net

v:\> dir ftp:

 Directory of  ftp://vefatica.net/*

2017-10-18  04:44         <DIR>    4plugins
2017-07-21  07:20         <DIR>    pmaddons
2014-08-08  00:00       3,657,325  arnex4.JPG
2012-07-17  00:00         109,138  MercOnSvcDesk.png
           3,766,463 bytes in 2 files and 2 dirs

v:\> copy "ftp:arnex4.JPG"
ftp://vefatica.net/arnex4.JPG/arnex4.JPG => V:\arnex4.JPG
TCC: Get file properties failed [2]: No such file. "/arnex4.JPG/arnex4.JPG"
     0 files copied       1 failed

That works with ordinary FTP.

And this (the first below, no credentials) always fails the first time. After there has been a successful SFTP connection, it succeeds without credentials.
I figured TCC would give the anonymous credentials when I don't specify any.
Code:
v:\> iftp sftp://vefatica.net
TCC: Cannot authenticate with provided credentials. The following authentication methods are available for this user: password,publickey. "vefatica.net"

v:\> iftp sftp://anonymous:jpuser@vefatica.net

v:\> iftp /c

v:\> iftp sftp://vefatica.net

v:\> iftp
vefatica.net/

v:\>[/code]
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
The DIR part is better, but this COPY fails sometimes.
Code:
v:\> iftp sftp://rexconn:*************@vefatica.net

v:\> copy "ftp:arnex4.JPG"
ftp://vefatica.net/arnex4.JPG/arnex4.JPG => V:\arnex4.JPG
TCC: Get file properties failed [2]: No such file. "/arnex4.JPG/arnex4.JPG"
     0 files copied       1 failed

That works with ordinary FTP.

Something is wrong with your SSH server. TCC is attempting to determine whether the argument you passed is a file or a directory. TCC tries to change directories to the argument. If it fails it's a filename; if it succeeds it's a directory. Your server says the directory change to "/arnex4.JPG" succeeded, so everything after that point is bollixed up.
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
Also, your syntax is wrong. You should be using "sftp:" for all of the commands following the IFTP. TCC can usually guess that you entered the wrong FTP designation and autocorrect, but that's not guaranteed (definitely not guaranteed if you have a concurrent IFTP ftp:...).
 
May 20, 2008
11,380
98
Syracuse, NY, USA
Something is flaky. Here are the very same (exactly) commands I posted last night, when DIR succeeded and COPY failed.
Code:
v:\> iftp sftp://rexconn:***********@vefatica.net

v:\> dir ftp:

TCC: (Sys) The system cannot find the file specified.
 "ftp:/"
                   0 bytes in 0 files and 0 dirs

v:\> copy "ftp:arnex4.JPG"
ftp://vefatica.net/arnex4.JPG => V:\arnex4.JPG
     1 file copied
Today, DIR doesn't work and COPY does. And it's the same if I use the correct "sftp:".
Code:
v:\> iftp sftp://rexconn:************@vefatica.net

v:\> dir sftp:

TCC: (Sys) The system cannot find the file specified.
 "sftp:/"
                   0 bytes in 0 files and 0 dirs

v:\> copy "sftp:arnex4.JPG"
sftp://vefatica.net/arnex4.JPG => V:\arnex4.JPG
     1 file copied

The DIR succeeds if I use sftp:\* or ftp:\* instead of "sftp:" or "ftp:"
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
If you have a wildcard in the name, then TCC knows it cannot be a directory name. If not, TCC tries to determine if it's a file name or a directory name. Apparently your server can't decide.

I tried this on several other SFTP servers and can't reproduce it.
 
May 20, 2008
11,380
98
Syracuse, NY, USA
Here's ALL that happens when I issue "dir sftp:\*" (which is successful and shows 4 items).
Code:
[30] Sat 11Nov17 11:25:01 - (000094) {0x00000002} SSH_FXP_REALPATH: path: "/"
[31] Sat 11Nov17 11:25:01 - (000094) {0x00000002} SSH_FXP_NAME: path: "/"
[30] Sat 11Nov17 11:25:01 - (000094) {0x00000003} SSH_FXP_OPENDIR: path: "/"
[31] Sat 11Nov17 11:25:01 - (000094) {0x00000003} SSH_FXP_HANDLE: directory handle: 0x00000000
[32] Sat 11Nov17 11:25:01 - (000094) {0x00000004} SSH_FXP_READDIR: handle: 0x00000000
[33] Sat 11Nov17 11:25:01 - (000094) {0x00000004} SSH_FXP_NAME: found 4 items
[32] Sat 11Nov17 11:25:01 - (000094) {0x00000005} SSH_FXP_READDIR: handle: 0x00000000
[31] Sat 11Nov17 11:25:01 - (000094) {0x00000005} SSH_FX_EOF: End of file.
[30] Sat 11Nov17 11:25:01 - (000094) {0x00000006} SSH_FXP_CLOSE: handle: 0x00000000
[31] Sat 11Nov17 11:25:01 - (000094) {0x00000006} SSH_FX_OK: Success.
[30] Sat 11Nov17 11:25:01 - (000094) {0x00000007} SSH_FXP_REALPATH: path: "/"
[31] Sat 11Nov17 11:25:01 - (000094) {0x00000007} SSH_FXP_NAME: path: "/"

And here's what happens when I issue "dir sftp:" The first 12 entries are identical to what's above, but I get the file_not_found message from TCC. Then TCC does the same thing over again, with the same result.
Code:
[30] Sat 11Nov17 11:26:06 - (000095) {0x00000002} SSH_FXP_REALPATH: path: "/"
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000002} SSH_FXP_NAME: path: "/"
[30] Sat 11Nov17 11:26:06 - (000095) {0x00000003} SSH_FXP_OPENDIR: path: "/"
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000003} SSH_FXP_HANDLE: directory handle: 0x00000000
[32] Sat 11Nov17 11:26:06 - (000095) {0x00000004} SSH_FXP_READDIR: handle: 0x00000000
[33] Sat 11Nov17 11:26:06 - (000095) {0x00000004} SSH_FXP_NAME: found 4 items
[32] Sat 11Nov17 11:26:06 - (000095) {0x00000005} SSH_FXP_READDIR: handle: 0x00000000
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000005} SSH_FX_EOF: End of file.
[30] Sat 11Nov17 11:26:06 - (000095) {0x00000006} SSH_FXP_CLOSE: handle: 0x00000000
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000006} SSH_FX_OK: Success.
[30] Sat 11Nov17 11:26:06 - (000095) {0x00000007} SSH_FXP_REALPATH: path: "/"
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000007} SSH_FXP_NAME: path: "/"
[30] Sat 11Nov17 11:26:06 - (000095) {0x00000008} SSH_FXP_REALPATH: path: "/"
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000008} SSH_FXP_NAME: path: "/"
[30] Sat 11Nov17 11:26:06 - (000095) {0x00000009} SSH_FXP_OPENDIR: path: "/"
[31] Sat 11Nov17 11:26:06 - (000095) {0x00000009} SSH_FXP_HANDLE: directory handle: 0x00000001
[32] Sat 11Nov17 11:26:06 - (000095) {0x0000000a} SSH_FXP_READDIR: handle: 0x00000001
[33] Sat 11Nov17 11:26:06 - (000095) {0x0000000a} SSH_FXP_NAME: found 4 items
[32] Sat 11Nov17 11:26:06 - (000095) {0x0000000b} SSH_FXP_READDIR: handle: 0x00000001
[31] Sat 11Nov17 11:26:06 - (000095) {0x0000000b} SSH_FX_EOF: End of file.
[30] Sat 11Nov17 11:26:06 - (000095) {0x0000000c} SSH_FXP_CLOSE: handle: 0x00000001
[31] Sat 11Nov17 11:26:06 - (000095) {0x0000000c} SSH_FX_OK: Success.
[30] Sat 11Nov17 11:26:06 - (000095) {0x0000000d} SSH_FXP_REALPATH: path: "/"
[31] Sat 11Nov17 11:26:06 - (000095) {0x0000000d} SSH_FXP_NAME: path: "/"
 
Similar threads
Thread starter Title Forum Replies Date
M syntax for sftp with publickey Support 3
P Problem with SFTP copies Support 7
vefatica How are SFTP fingerprints handled? Support 5
vefatica SFTP Support 2
vefatica IFTP and SFTP Support 7
B when doing SFTP via IFTP to my secure site my users always get the finger print key prompt Support 1
U Variables _IFTP, _IFTPS: what about sftp connections? Support 2
cgunhouse SFTP Password Problem Support 1
S Crashes when using SFTP Support 7
millardjk SFTP fingerprint acknowledgement Support 5
C forum Posting Question... Support 3
C question re: Move Support 3
S How to? Upgrade Question: What supporting documentation is required at time of purchase? Support 2
Peter Murschall Documentation Question to %@PSHELL Support 4
Fross Tab Question Support 6
Fross Quick Function Question Support 17
Dick Johnson Question about the Touch command Support 0
rps Documentation "Copy+Paste+run" question Support 2
vefatica Question about IPWorks Support 0
C How to? SHORTCUT question..... Support 6
vefatica TPIPE, crash and question Support 1
C Question / Suggestion Support 1
MickeyF Another TPIPE question Support 6
vefatica Another @EVERYTHING question Support 4
mikea How to? %@everything[] question Support 10
A License Question for Single User Support 5
Jay Sage Help Correction (and Related Question) Support 0
S Elapsed time in TCC prompt question Support 0
H command line parsing question Support 5
C Forum question Support 2
B Newbie here, I have a question. Support 4
J Dumb Question ... Support 4
Timothy Byrd Updating from TC 9 to TC 17 - TCTOOLBAR question Support 2
M A possibly stupid question about the "del" command... Support 7
M A just out of curiosity question re @DiskTotal Support 4
Fross Status Bar Time Question Support 1
A Stupid, obvious question - launch a BAT with TC Support 10
C How to? GLOBAL question Support 5
vefatica OT: VisualStudio question Support 1
vefatica Wildcard question Support 4
Dan Glynhampton v15 installer question Support 2
C Move question with Encrypted file... Support 6
M Maybe Maybe I'm being stupid (again), but a simple question... Support 4
C Message Board question Support 1
James Miller How to? filename completion question Support 1
C coding question Support 3
M A just-out-of-curiosity question because it's ... Support 6
Frank question to FOLDERMONITOR Support 14
C Dumb titleprompt question Support 4
M Upgrade Question Support 2

Similar threads