Community discussions

 
Hish
just joined
Topic Author
Posts: 1
Joined: Thu Feb 07, 2019 10:37 pm
Location: Clifton

SFTP Session to Mikrotik problem with "ls", SecureFX works

Thu Feb 07, 2019 11:23 pm

Hi all!

I've got a problem with SFTP sessions started with "File -> Connect SFTP Session".

What we've got:

1) SecureCRT 8.1.4 on my end
2) a Mikrotik RouterOS device on the remote end, capable of SFTP.

I want to start an SFTP session to the Mikrotik box and list the contents of its filesystem.

I do "File -> Connect SFTP Session" in SecureCRT while having the required session open.

You can see what I get here:
Code:
sftp> pwd
/
sftp> ls
.
sftp> ls -la
lrwxrwxrwx 0        0               8 Oct 12, 2017 14:26 . -> /var/pckg/rw/pckg
sftp>
However if I use SecureFX to connect to it, I get this:
Code:
i Resolved RealPath: / 
< lrwxrwxrwx        8 Thu 12-Oct-2017 14:26:20 . (S)
< drwxr-xr-x      111 Thu 12-Oct-2017 14:29:57 .. (S)
< -rw-r--r--     1372 Fri 29-Dec-2017 12:45:47 alogin.html (S)
< -rw-r--r--    20987 Mon 12-Dec-2016 10:58:56 Update_English.txt (S)
< drwxr-xr-x     2048 Thu 01-Jan-1970 03:00:40 skins (S)
< -rw-------    16608 Sat 27-Aug-2016 18:29:17 rt-office_2016-08-27.rsc (S)
< drwxr-xr-x     2048 Fri 02-Jan-1970 03:00:08 user-manager1 (S)
< drwx------     2048 Thu 23-Mar-2017 11:24:09 tftp (S)
< drwx------     2048 Thu 02-Apr-2015 17:01:43 webproxy (S)
< ----------    12457 Wed 25-Oct-2017 14:46:12 rueha-log.0.txt (S)
< ----------    72412 Wed 25-Oct-2017 14:46:03 rueha-ipsec-log.0.txt (S)
< -rw-------    19548 Mon 02-Oct-2017 19:44:59 rt-office_20171002.rsc (S)
< ----------    58032 Tue 09-Jan-2018 05:44:54 log.0.txt (S)
< -rw-r--r--     2000 Wed 25-Oct-2017 17:55:04 test.bin (S)
< -rw-------    18998 Tue 27-Jun-2017 00:17:37 rt-office_2017-06-27.rsc (S)
< -rw-r--r--     5768 Wed 25-Oct-2017 17:17:56 cert_export_svy-client-cert.p12 (S)
< drwxr-xr-x     2048 Wed 10-Apr-2013 22:36:23 pub (S)
< drwxr-xr-x     2048 Wed 10-Apr-2013 22:36:23 web-proxy1 (S)
i SEND : Stat /.
That is, I can see all the files there.

Also if I connect to a Linux box, I can "ls" files fine.

Also I can "put" files to the Mikrotik box without problems and they will appear when listing files in SecureFX. That means, they get uploaded OK.
The problem is with listing the contents of the directory.

This is a trace level 9 log from the Mikrotik session:
Code:
[LOCAL] : [SEND] : 
00000000 | 00 00 00 00 00 5a 00 00 00 07 73 65 73 73 69 6f  .....Z....sessio
00000016 | 6e 00 00 00 01 40 00 00 00 00 00 80 00           n....@.......   
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 1c 0a 5b 00 00 00 01 00 00 00 03 00 28  .....[.........(
00000016 | 00 00 00 04 00 00                                ......          
 
[LOCAL] : [SEND] : 
00000000 | 5a 00 00 00 00 62 00 00 00 03 00 00 00 09 73 75  Z....b........su
00000016 | 62 73 79 73 74 65 6d 01 00 00 00 04 73 66 74 70  bsystem.....sftp
 
[LOCAL] : RECV[1]: SSH_MSG_CHANNEL_OPEN 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 0c 06 63 00 00 00 01                    .....c....      
 
[LOCAL] : [SEND] : 
00000000 | 37 00 34 00 20 5e 00 00 00 03 00 00 00 09 00 00  7.4. ^..........
00000016 | 00 05 01 00 00 00 06                             .......         
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 1c 09 5e 00 00 00 01 00 00 00 09 00 00  .....^..........
00000016 | 00 05 02 00 00 00 03                             .......         
 
[LOCAL] : [SEND] : 
00000000 | 3c 00 00 00 00 5e 00 00 00 03 00 00 00 35 00 00  <....^.......5..
00000016 | 00 31 c8 00 00 00 00 00 00 00 27 66 73 2d 6d 75  .1........'fs-mu
00000032 | 6c 74 69 70 6c 65 2d 72 6f 6f 74 73 2d 73 75 70  ltiple-roots-sup
00000048 | 70 6f 72 74 65 64 40 76 61 6e 64 79 6b 65 2e 63  ported@vandyke.c
00000064 | 6f 6d 00                                         om.             
 
[LOCAL] : [SEND] : 
00000000 | 6c 00 00 00 00 5e 00 00 00 03 00 00 00 5f 00 00  l....^......._..
00000016 | 00 5b c8 00 00 00 01 00 00 00 09 76 65 6e 64 6f  .[.........vendo
00000032 | 72 2d 69 64 00 00 00 16 56 61 6e 44 79 6b 65 20  r-id....VanDyke 
00000048 | 53 6f 66 74 77 61 72 65 2c 20 49 6e 63 2e 00 00  Software, Inc...
00000064 | 00 09 53 65 63 75 72 65 43 52 54 00 00 00 16 38  ..SecureCRT....8
00000080 | 2e 31 2e 34 20 28 78 36 34 20 62 75 69 6c 64 20  .1.4 (x64 build 
00000096 | 31 34 34 33 29 00 08 00 01 00 00 05 a3           1443)........   
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 2c 0d 5e 00 00 00 01 00 00 00 15 00 00  ...,.^..........
00000016 | 00 11 65 00 00 00 00 00 00 00 08 00 00 00 00 00  ..e.............
00000032 | 00 00 00                                         ...             
 
[LOCAL] : [SEND] : 
00000000 | 20 00 00 00 00 5e 00 00 00 03 00 00 00 0e 00 00   ....^..........
00000016 | 00 0a 07 00 00 00 00 00 00 00 01 2f              .........../    
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 2c 0d 5e 00 00 00 01 00 00 00 15 00 00  ...,.^..........
00000016 | 00 11 65 00 00 00 01 00 00 00 08 00 00 00 00 00  ..e.............
00000032 | 00 00 00                                         ...             
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 3c 09 5e 00 00 00 01 00 00 00 29 00 00  ...<.^.......)..
00000016 | 00 25 69 00 00 00 00 00 00 00 0f 00 00 00 00 00  ..i.............
00000032 | 00 08 00 00 00 00 02 00 00 00 02 00 00 41 ff 00  .............A..
00000048 | 00 00 14 00 00 00 14                             .......         
 
[LOCAL] : [SEND] : 
00000000 | 20 00 00 00 00 5e 00 00 00 03 00 00 00 0e 00 00   ....^..........
00000016 | 00 0a 11 00 00 00 00 00 00 00 01 2f              .........../    
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 3c 09 5e 00 00 00 01 00 00 00 29 00 00  ...<.^.......)..
00000016 | 00 25 69 00 00 00 00 00 00 00 0f 00 00 00 00 00  ..i.............
00000032 | 00 08 00 00 00 00 02 00 00 00 02 00 00 41 ff 00  .............A..
00000048 | 00 00 14 00 00 00 14                             .......         
 
[LOCAL] : [SEND] : 
00000000 | 1a 00 00 00 00 5e 00 00 00 03 00 00 00 0e 00 00  .....^..........
00000016 | 00 0a 10 00 00 00 00 00 00 00 01 2f              .........../    
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 7c 06 5e 00 00 00 01 00 00 00 6c 00 00  ...|.^.......l..
00000016 | 00 68 68 00 00 00 00 00 00 00 01 00 00 00 01 2f  .hh............/
00000032 | 00 00 00 36 64 72 77 78 72 77 78 72 77 78 20 20  ...6drwxrwxrwx  
00000048 | 20 31 20 30 20 30 20 20 20 20 20 20 20 20 20 20   1 0 0          
00000064 | 20 20 20 20 20 20 20 32 30 34 38 20 4a 61 6e 20         2048 Jan 
00000080 | 30 31 20 20 31 39 37 30 20 2f 00 00 00 0f 00 00  01  1970 /......
00000096 | 00 00 00 00 08 00 00 00 00 02 00 00 00 02 00 00  ................
00000112 | 41 ff 00 00 00 14 00 00 00 14                    A.........      
 
[LOCAL] : [SEND] : 
00000000 | 1c 00 00 00 00 5e 00 00 00 03 00 00 00 0f 00 00  .....^..........
00000016 | 00 0b 07 00 00 00 00 00 00 00 02 2f 2e           .........../.   
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 3c 09 5e 00 00 00 01 00 00 00 29 00 00  ...<.^.......)..
00000016 | 00 25 69 00 00 00 00 00 00 00 0f 00 00 00 00 00  ..i.............
00000032 | 00 00 08 00 00 00 00 00 00 00 00 00 00 a1 ff 59  ...............Y
00000048 | df 51 5c 59 df 51 5c                             .Q\Y.Q\         
 
[LOCAL] : [SEND] : 
00000000 | 1b 00 00 00 00 5e 00 00 00 03 00 00 00 0f 00 00  .....^..........
00000016 | 00 0b 11 00 00 00 00 00 00 00 02 2f 2e           .........../.   
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 3c 09 5e 00 00 00 01 00 00 00 29 00 00  ...<.^.......)..
00000016 | 00 25 69 00 00 00 00 00 00 00 0f 00 00 00 00 00  ..i.............
00000032 | 00 08 00 00 00 00 02 00 00 00 02 00 00 41 ff 00  .............A..
00000048 | 00 00 14 00 00 00 14                             .......         
 
[LOCAL] : [SEND] : 
00000000 | 25 00 00 00 00 5e 00 00 00 03 00 00 00 0f 00 00  .....^..........
00000016 | 00 0b 10 00 00 00 00 00 00 00 02 2f 2e           .........../.   
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 7c 06 5e 00 00 00 01 00 00 00 6c 00 00  ...|.^.......l..
00000016 | 00 68 68 00 00 00 00 00 00 00 01 00 00 00 01 2f  .hh............/
00000032 | 00 00 00 36 64 72 77 78 72 77 78 72 77 78 20 20  ...6drwxrwxrwx  
00000048 | 20 31 20 30 20 30 20 20 20 20 20 20 20 20 20 20   1 0 0          
00000064 | 20 20 20 20 20 20 20 32 30 34 38 20 4a 61 6e 20         2048 Jan 
00000080 | 30 31 20 20 31 39 37 30 20 2f 00 00 00 0f 00 00  01  1970 /......
00000096 | 00 00 00 00 08 00 00 00 00 02 00 00 00 02 00 00  ................
00000112 | 41 ff 00 00 00 14 00 00 00 14                    A.........      
 
[LOCAL] : [SEND] : 
00000000 | 5b 00 4c 00 4f 5e 00 00 00 03 00 00 00 0f 00 00  [.L.O^..........
00000016 | 00 0b 13 00 00 00 00 00 00 00 02 2f 2e           .........../.   
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 4c 07 5e 00 00 00 01 00 00 00 3b 00 00  ...L.^.......;..
00000016 | 00 37 68 00 00 00 00 00 00 00 01 00 00 00 11 2f  .7h............/
00000032 | 76 61 72 2f 70 63 6b 67 2f 72 77 2f 70 63 6b 67  var/pckg/rw/pckg
00000048 | 00 00 00 11 2f 76 61 72 2f 70 63 6b 67 2f 72 77  ..../var/pckg/rw
00000064 | 2f 70 63 6b 67 00 00 00 00                       /pckg....       
 
[LOCAL] : SEND[1]: SSH_MSG_CHANNEL_EOF 
[LOCAL] : [SEND] : 
00000000 | 00 00 00 00 00 60 00 00 00 03                    .....`....      
 
[LOCAL] : SEND[1]: channel close 
[LOCAL] : [SEND] : 
00000000 | 66 00 00 00 00 61 00 00 00 03                    f....a....      
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 2c 12 62 00 00 00 01 00 00 00 0b 65 78  ...,.b........ex
00000016 | 69 74 2d 73 74 61 74 75 73 00 00 00 00 00        it-status.....  
 
[LOCAL] : [RECV] : 
00000000 | 00 00 00 0c 06 61 00 00 00 01                    .....a....      
 
[LOCAL] : RECV[1]: channel close.
I'd be very grateful for any assistance. Thanks.

Who is online

Users browsing this forum: No registered users and 27 guests