Наш банк создал учетную запись, в которую мы можем войти через SFTP и загружать файлы. Я пытаюсь использовать phpseclib для этого. Я использовал его много раз раньше без проблем, но с этим удаленным сайтом я не могу получить список файлов в каталоге.
Я могу войти в систему с помощью FileZilla, и файлы есть.
Я попытался:
$sftp = new SFTP($hostname, $port);
if (!$sftp->login($username, $password))
{
log_message('tcx', 'SFTP Login Failed');
exit;
}
$sftp->chdir('./Outbox');
echo $sftp->pwd(); //returns /Outbox
$file_list = $sftp->nlist(); // returns empty array
и попытался использовать метод nlist с рекурсивной опцией:
$sftp = new SFTP($hostname, $port);
if (!$sftp->login($username, $password))
{
log_message('tcx', 'SFTP Login Failed');
exit;
}
echo $sftp->pwd(); //returns /
$file_list = $sftp->nlist('.', TRUE); // returns Array ( [0] => Inbox [1] => Outbox )
Хотя, возможно, это как-то связано с разрешениями, установленными для файлов, поэтому я настроил тест на другой удаленной системе, используя те же разрешения, и мне удалось вывести эти файлы в список. ОК.
В FileZilla я включил ведение журнала отладки и вижу:
Status: Connecting to XXXXX.com:10022...
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 0
Trace: Going to execute C:\Program Files (x86)\FileZilla FTP Client\fzsftp.exe
Response: fzSftp started, protocol_version=8
Trace: CSftpConnectOpData::ParseResponse() in state 0
Trace: CControlSocket::SendNextCommand()
Trace: CSftpConnectOpData::Send() in state 3
Command: open "user@XXXXX.com" 10022
Trace: Connecting to 123.456.789 port 10022
Trace: We claim version: SSH-2.0-FileZilla_3.45.1
Trace: Server version: SSH-2.0-SFTP Server
Trace: Using SSH protocol version 2
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-256
Trace: Host key fingerprint is:
Trace: ssh-rsa 2048 68:ea:3a:XXXXXXXXXXXXXXXXXXXXXXXXxXXXXXXXXXXX
Trace: Initialised AES-256 SDCTR client->server encryption
Trace: Initialised HMAC-SHA-256 client->server MAC algorithm
Trace: Initialised AES-256 SDCTR server->client encryption
Trace: Initialised HMAC-SHA-256 server->client MAC algorithm
Trace: Attempting keyboard-interactive authentication
Trace: Using keyboard-interactive authentication. inst_len: 28, num_prompts: 1
Command: Pass: *********
Trace: Access granted
Trace: Opening session as main channel
Trace: Opened main channel
Trace: Started a shell/command
Status: Connected to XXXXXX.com
Trace: CSftpConnectOpData::ParseResponse() in state 3
Trace: CControlSocket::ResetOperation(0)
Trace: CSftpConnectOpData::Reset(0) in state 3
Trace: CFileZillaEnginePrivate::ResetOperation(0)
Status: Retrieving directory listing...
Trace: CControlSocket::SendNextCommand()
Trace: CSftpListOpData::Send() in state 0
Trace: CSftpChangeDirOpData::Send() in state 0
Trace: CSftpChangeDirOpData::Send() in state 1
Command: pwd
Response: Current directory is: "/"
Trace: CSftpChangeDirOpData::ParseResponse() in state 1
Trace: CControlSocket::ResetOperation(0)
Trace: CSftpChangeDirOpData::Reset(0) in state 1
Trace: CSftpListOpData::SubcommandResult(0) in state 1
Trace: CControlSocket::SendNextCommand()
Trace: CSftpListOpData::Send() in state 2
Trace: CSftpListOpData::Send() in state 3
Command: ls
Status: Listing directory /
Trace: CSftpListOpData::ParseResponse() in state 3
Trace: CControlSocket::ResetOperation(0)
Trace: CSftpListOpData::Reset(0) in state 3
Status: Directory listing of "/" successful
Trace: CFileZillaEnginePrivate::ResetOperation(0)
Status: Retrieving directory listing of "/Outbox"...
Trace: CControlSocket::SendNextCommand()
Trace: CSftpListOpData::Send() in state 0
Trace: CSftpChangeDirOpData::Send() in state 0
Trace: CSftpChangeDirOpData::Send() in state 2
Command: cd "/Outbox"
Response: New directory is: "/Outbox"
Trace: CSftpChangeDirOpData::ParseResponse() in state 2
Trace: CControlSocket::ResetOperation(0)
Trace: CSftpChangeDirOpData::Reset(0) in state 2
Trace: CSftpListOpData::SubcommandResult(0) in state 1
Trace: CControlSocket::SendNextCommand()
Trace: CSftpListOpData::Send() in state 2
Trace: CSftpListOpData::Send() in state 3
Command: ls
Status: Listing directory /Outbox
Trace: CSftpListOpData::ParseResponse() in state 3
Trace: CControlSocket::ResetOperation(0)
Trace: CSftpListOpData::Reset(0) in state 3
Status: Directory listing of "/Outbox" successful
Trace: CFileZillaEnginePrivate::ResetOperation(0)
Для вывода файлов используется команда ls. Можно ли это сделать с помощью phpseclib с помощью метода $ sftp-> exec ()? Я искал несколько примеров, используя это, но на самом деле не нашел ничего подходящего.
Кто-нибудь знает, что здесь происходит не так?
Редактировать вывод из журналов SFTP:
-> NET_SFTP_INIT (0.0001s)
00000000 00:00:00:03 ....
<- NET_SFTP_VERSION (0.0843s)
00000000 00:00:00:03:00:00:00:13:6e:65:77:6c:69:6e:65:40 ........newline@
00000010 76:61:6e:64:79:6b:65:2e:63:6f:6d:00:00:00:01:0a vandyke.com.....
-> NET_SFTP_REALPATH (0.0001s)
00000000 00:00:00:01:2e .....
<- NET_SFTP_NAME (0.091s)
00000000 00:00:00:01:00:00:00:01:2f:00:00:00:01:2f:00:00 ......../..../..
00000010 00:0f:00:00:00:00:00:00:04:00:00:00:01:2c:00:00 .............,..
00000020 00:64:00:00:41:c0:5d:97:6b:1f:5d:97:6b:1f .d..A.].k.].k.
-> NET_SFTP_OPENDIR (0.0001s)
00000000 00:00:00:07:2f:4f:75:74:62:6f:78 ..../Outbox
<- NET_SFTP_HANDLE (0.0892s)
00000000 00:00:00:01:30 ....0
-> NET_SFTP_CLOSE (0.0001s)
00000000 00:00:00:01:30 ....0
<- NET_SFTP_STATUS (0.0844s)
00000000 00:00:00:00:00:00:00:17:54:68:65:20:6f:70:65:72 ........The oper
00000010 61:74:69:6f:6e:20:63:6f:6d:70:6c:65:74:65:64:00 ation completed.
00000020 00:00:00 ...
-> NET_SFTP_OPENDIR (0.0001s)
00000000 00:00:00:07:2f:4f:75:74:62:6f:78 ..../Outbox
<- NET_SFTP_HANDLE (0.0898s)
00000000 00:00:00:01:31 ....1
-> NET_SFTP_READDIR (0.0001s)
00000000 00:00:00:01:31 ....1
<- NET_SFTP_STATUS (0.0904s)
00000000 00:00:00:01:00:00:00:22:45:4f:46:20:72:65:61:63 ......."EOF reac
00000010 68:65:64:20:66:6f:72:20:4d:61:69:6c:62:6f:78:20 hed for Mailbox
00000020 5b:2f:4f:75:74:62:6f:78:5d:2e:00:00:00:00 [/Outbox].....
-> NET_SFTP_CLOSE (0.0001s)
00000000 00:00:00:01:31 ....1
<- NET_SFTP_STATUS (0.0843s)
00000000 00:00:00:00:00:00:00:17:54:68:65:20:6f:70:65:72 ........The oper
00000010 61:74:69:6f:6e:20:63:6f:6d:70:6c:65:74:65:64:00 ation completed.
00000020 00:00:00
SSH Logs
<-
00000000 53:53:48:2d:32:2e:30:2d:53:46:54:50:20:53:65:72 SSH-2.0-SFTP Ser
00000010 76:65:72:0d:0a ver..
->
00000000 53:53:48:2d:32:2e:30:2d:70:68:70:73:65:63:6c:69 SSH-2.0-phpsecli
00000010 62:5f:32:2e:30:20:28:6f:70:65:6e:73:73:6c:2c:20 b_2.0 (openssl,
00000020 62:63:6d:61:74:68:29:0d:0a bcmath)..
-> NET_SSH2_MSG_KEXINIT (since last: 0.2135, network: 0s)
00000000 f0:30:0e:c6:ea:6f:b2:08:ec:a7:2d:09:97:2f:42:a5 .0...o....-../B.
00000010 00:00:01:7c:63:75:72:76:65:32:35:35:31:39:2d:73 ...|curve25519-s
00000020 68:61:32:35:36:2c:63:75:72:76:65:32:35:35:31:39 ha256,curve25519
00000030 2d:73:68:61:32:35:36:40:6c:69:62:73:73:68:2e:6f -sha256@libssh.o
00000040 72:67:2c:65:63:64:68:2d:73:68:61:32:2d:6e:69:73 rg,ecdh-sha2-nis
00000050 74:70:32:35:36:2c:65:63:64:68:2d:73:68:61:32:2d tp256,ecdh-sha2-
00000060 6e:69:73:74:70:33:38:34:2c:65:63:64:68:2d:73:68 nistp384,ecdh-sh
00000070 61:32:2d:6e:69:73:74:70:35:32:31:2c:64:69:66:66 a2-nistp521,diff
00000080 69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70 ie-hellman-group
00000090 2d:65:78:63:68:61:6e:67:65:2d:73:68:61:32:35:36 -exchange-sha256
000000a0 2c:64:69:66:66:69:65:2d:68:65:6c:6c:6d:61:6e:2d ,diffie-hellman-
000000b0 67:72:6f:75:70:2d:65:78:63:68:61:6e:67:65:2d:73 group-exchange-s
000000c0 68:61:31:2c:64:69:66:66:69:65:2d:68:65:6c:6c:6d ha1,diffie-hellm
000000d0 61:6e:2d:67:72:6f:75:70:31:34:2d:73:68:61:32:35 an-group14-sha25
000000e0 36:2c:64:69:66:66:69:65:2d:68:65:6c:6c:6d:61:6e 6,diffie-hellman
000000f0 2d:67:72:6f:75:70:31:34:2d:73:68:61:31:2c:64:69 -group14-sha1,di
00000100 66:66:69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f ffie-hellman-gro
00000110 75:70:31:35:2d:73:68:61:35:31:32:2c:64:69:66:66 up15-sha512,diff
00000120 69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70 ie-hellman-group
00000130 31:36:2d:73:68:61:35:31:32:2c:64:69:66:66:69:65 16-sha512,diffie
00000140 2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70:31:37 -hellman-group17
00000150 2d:73:68:61:35:31:32:2c:64:69:66:66:69:65:2d:68 -sha512,diffie-h
00000160 65:6c:6c:6d:61:6e:2d:67:72:6f:75:70:31:38:2d:73 ellman-group18-s
00000170 68:61:35:31:32:2c:64:69:66:66:69:65:2d:68:65:6c ha512,diffie-hel
00000180 6c:6d:61:6e:2d:67:72:6f:75:70:31:2d:73:68:61:31 lman-group1-sha1
00000190 00:00:00:71:73:73:68:2d:65:64:32:35:35:31:39:2c ...qssh-ed25519,
000001a0 65:63:64:73:61:2d:73:68:61:32:2d:6e:69:73:74:70 ecdsa-sha2-nistp
000001b0 32:35:36:2c:65:63:64:73:61:2d:73:68:61:32:2d:6e 256,ecdsa-sha2-n
000001c0 69:73:74:70:33:38:34:2c:65:63:64:73:61:2d:73:68 istp384,ecdsa-sh
000001d0 61:32:2d:6e:69:73:74:70:35:32:31:2c:72:73:61:2d a2-nistp521,rsa-
000001e0 73:68:61:32:2d:32:35:36:2c:72:73:61:2d:73:68:61 sha2-256,rsa-sha
000001f0 32:2d:35:31:32:2c:73:73:68:2d:72:73:61:2c:73:73 2-512,ssh-rsa,ss
00000200 68:2d:64:73:73:00:00:01:01:61:65:73:31:32:38:2d h-dss....aes128-
00000210 67:63:6d:40:6f:70:65:6e:73:73:68:2e:63:6f:6d:2c gcm@openssh.com,
00000220 61:65:73:32:35:36:2d:67:63:6d:40:6f:70:65:6e:73 aes256-gcm@opens
00000230 73:68:2e:63:6f:6d:2c:61:65:73:31:32:38:2d:63:74 sh.com,aes128-ct
00000240 72:2c:61:65:73:31:39:32:2d:63:74:72:2c:61:65:73 r,aes192-ctr,aes
00000250 32:35:36:2d:63:74:72:2c:61:65:73:31:32:38:2d:63 256-ctr,aes128-c
00000260 62:63:2c:61:65:73:31:39:32:2d:63:62:63:2c:61:65 bc,aes192-cbc,ae
00000270 73:32:35:36:2d:63:62:63:2c:62:6c:6f:77:66:69:73 s256-cbc,blowfis
00000280 68:2d:63:74:72:2c:62:6c:6f:77:66:69:73:68:2d:63 h-ctr,blowfish-c
00000290 62:63:2c:33:64:65:73:2d:63:74:72:2c:33:64:65:73 bc,3des-ctr,3des
000002a0 2d:63:62:63:2c:74:77:6f:66:69:73:68:31:32:38:2d -cbc,twofish128-
000002b0 63:74:72:2c:74:77:6f:66:69:73:68:31:39:32:2d:63 ctr,twofish192-c
000002c0 74:72:2c:74:77:6f:66:69:73:68:32:35:36:2d:63:74 tr,twofish256-ct
000002d0 72:2c:74:77:6f:66:69:73:68:31:32:38:2d:63:62:63 r,twofish128-cbc
000002e0 2c:74:77:6f:66:69:73:68:31:39:32:2d:63:62:63:2c ,twofish192-cbc,
000002f0 74:77:6f:66:69:73:68:32:35:36:2d:63:62:63:2c:74 twofish256-cbc,t
00000300 77:6f:66:69:73:68:2d:63:62:63:00:00:01:01:61:65 wofish-cbc....ae
00000310 73:31:32:38:2d:67:63:6d:40:6f:70:65:6e:73:73:68 s128-gcm@openssh
00000320 2e:63:6f:6d:2c:61:65:73:32:35:36:2d:67:63:6d:40 .com,aes256-gcm@
00000330 6f:70:65:6e:73:73:68:2e:63:6f:6d:2c:61:65:73:31 openssh.com,aes1
00000340 32:38:2d:63:74:72:2c:61:65:73:31:39:32:2d:63:74 28-ctr,aes192-ct
00000350 72:2c:61:65:73:32:35:36:2d:63:74:72:2c:61:65:73 r,aes256-ctr,aes
00000360 31:32:38:2d:63:62:63:2c:61:65:73:31:39:32:2d:63 128-cbc,aes192-c
00000370 62:63:2c:61:65:73:32:35:36:2d:63:62:63:2c:62:6c bc,aes256-cbc,bl
00000380 6f:77:66:69:73:68:2d:63:74:72:2c:62:6c:6f:77:66 owfish-ctr,blowf
00000390 69:73:68:2d:63:62:63:2c:33:64:65:73:2d:63:74:72 ish-cbc,3des-ctr
000003a0 2c:33:64:65:73:2d:63:62:63:2c:74:77:6f:66:69:73 ,3des-cbc,twofis
000003b0 68:31:32:38:2d:63:74:72:2c:74:77:6f:66:69:73:68 h128-ctr,twofish
000003c0 31:39:32:2d:63:74:72:2c:74:77:6f:66:69:73:68:32 192-ctr,twofish2
000003d0 35:36:2d:63:74:72:2c:74:77:6f:66:69:73:68:31:32 56-ctr,twofish12
000003e0 38:2d:63:62:63:2c:74:77:6f:66:69:73:68:31:39:32 8-cbc,twofish192
000003f0 2d:63:62:63:2c:74:77:6f:66:69:73:68:32:35:36:2d -cbc,twofish256-
00000400 63:62:63:2c:74:77:6f:66:69:73:68:2d:63:62:63:00 cbc,twofish-cbc.
00000410 00:00:f7:68:6d:61:63:2d:73:68:61:32:2d:32:35:36 ...hmac-sha2-256
00000420 2d:65:74:6d:40:6f:70:65:6e:73:73:68:2e:63:6f:6d -etm@openssh.com
00000430 2c:68:6d:61:63:2d:73:68:61:32:2d:35:31:32:2d:65 ,hmac-sha2-512-e
00000440 74:6d:40:6f:70:65:6e:73:73:68:2e:63:6f:6d:2c:75 tm@openssh.com,u
00000450 6d:61:63:2d:36:34:2d:65:74:6d:40:6f:70:65:6e:73 mac-64-etm@opens
00000460 73:68:2e:63:6f:6d:2c:75:6d:61:63:2d:31:32:38:2d sh.com,umac-128-
00000470 65:74:6d:40:6f:70:65:6e:73:73:68:2e:63:6f:6d:2c etm@openssh.com,
00000480 68:6d:61:63:2d:73:68:61:31:2d:65:74:6d:40:6f:70 hmac-sha1-etm@op
00000490 65:6e:73:73:68:2e:63:6f:6d:2c:68:6d:61:63:2d:73 enssh.com,hmac-s
000004a0 68:61:32:2d:32:35:36:2c:68:6d:61:63:2d:73:68:61 ha2-256,hmac-sha
000004b0 32:2d:35:31:32:2c:75:6d:61:63:2d:36:34:40:6f:70 2-512,umac-64@op
000004c0 65:6e:73:73:68:2e:63:6f:6d:2c:75:6d:61:63:2d:31 enssh.com,umac-1
000004d0 32:38:40:6f:70:65:6e:73:73:68:2e:63:6f:6d:2c:68 28@openssh.com,h
000004e0 6d:61:63:2d:73:68:61:31:2d:39:36:2c:68:6d:61:63 mac-sha1-96,hmac
000004f0 2d:73:68:61:31:2c:68:6d:61:63:2d:6d:64:35:2d:39 -sha1,hmac-md5-9
00000500 36:2c:68:6d:61:63:2d:6d:64:35:00:00:00:f7:68:6d 6,hmac-md5....hm
00000510 61:63:2d:73:68:61:32:2d:32:35:36:2d:65:74:6d:40 ac-sha2-256-etm@
00000520 6f:70:65:6e:73:73:68:2e:63:6f:6d:2c:68:6d:61:63 openssh.com,hmac
00000530 2d:73:68:61:32:2d:35:31:32:2d:65:74:6d:40:6f:70 -sha2-512-etm@op
00000540 65:6e:73:73:68:2e:63:6f:6d:2c:75:6d:61:63:2d:36 enssh.com,umac-6
00000550 34:2d:65:74:6d:40:6f:70:65:6e:73:73:68:2e:63:6f 4-etm@openssh.co
00000560 6d:2c:75:6d:61:63:2d:31:32:38:2d:65:74:6d:40:6f m,umac-128-etm@o
00000570 70:65:6e:73:73:68:2e:63:6f:6d:2c:68:6d:61:63:2d penssh.com,hmac-
00000580 73:68:61:31:2d:65:74:6d:40:6f:70:65:6e:73:73:68 sha1-etm@openssh
00000590 2e:63:6f:6d:2c:68:6d:61:63:2d:73:68:61:32:2d:32 .com,hmac-sha2-2
000005a0 35:36:2c:68:6d:61:63:2d:73:68:61:32:2d:35:31:32 56,hmac-sha2-512
000005b0 2c:75:6d:61:63:2d:36:34:40:6f:70:65:6e:73:73:68 ,umac-64@openssh
000005c0 2e:63:6f:6d:2c:75:6d:61:63:2d:31:32:38:40:6f:70 .com,umac-128@op
000005d0 65:6e:73:73:68:2e:63:6f:6d:2c:68:6d:61:63:2d:73 enssh.com,hmac-s
000005e0 68:61:31:2d:39:36:2c:68:6d:61:63:2d:73:68:61:31 ha1-96,hmac-sha1
000005f0 2c:68:6d:61:63:2d:6d:64:35:2d:39:36:2c:68:6d:61 ,hmac-md5-96,hma
00000600 63:2d:6d:64:35:00:00:00:04:6e:6f:6e:65:00:00:00 c-md5....none...
00000610 04:6e:6f:6e:65:00:00:00:00:00:00:00:00:00:00:00 .none...........
00000620 00:00 ..
<- NET_SSH2_MSG_KEXINIT (since last: 0.0001, network: 0s)
00000000 1b:65:e5:8f:81:62:f3:ab:02:03:b8:47:ac:de:9f:e9 .e...b.....G....
00000010 00:00:01:86:64:69:66:66:69:65:2d:68:65:6c:6c:6d ....diffie-hellm
00000020 61:6e:2d:67:72:6f:75:70:31:2d:73:68:61:31:2c:63 an-group1-sha1,c
00000030 75:72:76:65:32:35:35:31:39:2d:73:68:61:32:35:36 urve25519-sha256
00000040 40:6c:69:62:73:73:68:2e:6f:72:67:2c:64:69:66:66 @libssh.org,diff
00000050 69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70 ie-hellman-group
00000060 2d:65:78:63:68:61:6e:67:65:2d:73:68:61:32:35:36 -exchange-sha256
00000070 2c:64:69:66:66:69:65:2d:68:65:6c:6c:6d:61:6e:2d ,diffie-hellman-
00000080 67:72:6f:75:70:31:38:2d:73:68:61:35:31:32:2c:64 group18-sha512,d
00000090 69:66:66:69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72 iffie-hellman-gr
000000a0 6f:75:70:31:37:2d:73:68:61:35:31:32:2c:64:69:66 oup17-sha512,dif
000000b0 66:69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75 fie-hellman-grou
000000c0 70:31:36:2d:73:68:61:35:31:32:2c:64:69:66:66:69 p16-sha512,diffi
000000d0 65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70:31 e-hellman-group1
000000e0 35:2d:73:68:61:35:31:32:2c:64:69:66:66:69:65:2d 5-sha512,diffie-
000000f0 68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70:31:34:2d hellman-group14-
00000100 73:68:61:32:35:36:2c:64:69:66:66:69:65:2d:68:65 sha256,diffie-he
00000110 6c:6c:6d:61:6e:2d:67:72:6f:75:70:31:34:2d:73:68 llman-group14-sh
00000120 61:31:2c:65:63:64:68:2d:73:68:61:32:2d:6e:69:73 a1,ecdh-sha2-nis
00000130 74:70:32:35:36:2c:65:63:64:68:2d:73:68:61:32:2d tp256,ecdh-sha2-
00000140 6e:69:73:74:70:33:38:34:2c:65:63:64:68:2d:73:68 nistp384,ecdh-sh
00000150 61:32:2d:6e:69:73:74:70:35:32:31:2c:64:69:66:66 a2-nistp521,diff
00000160 69:65:2d:68:65:6c:6c:6d:61:6e:2d:67:72:6f:75:70 ie-hellman-group
00000170 2d:65:78:63:68:61:6e:67:65:2d:73:68:61:31:2c:72 -exchange-sha1,r
00000180 73:61:32:30:34:38:2d:73:68:61:32:35:36:2c:72:73 sa2048-sha256,rs
00000190 61:31:30:32:34:2d:73:68:61:31:00:00:00:07:73:73 a1024-sha1....ss
000001a0 68:2d:72:73:61:00:00:00:41:61:65:73:32:35:36:2d h-rsa...Aaes256-
000001b0 63:62:63:2c:61:65:73:31:32:38:2d:63:74:72:2c:61 cbc,aes128-ctr,a
000001c0 65:73:31:39:32:2d:63:74:72:2c:61:65:73:32:35:36 es192-ctr,aes256
000001d0 2d:63:74:72:2c:61:65:73:31:32:38:2d:63:62:63:2c -ctr,aes128-cbc,
000001e0 61:65:73:31:39:32:2d:63:62:63:00:00:00:41:61:65 aes192-cbc...Aae
000001f0 73:32:35:36:2d:63:62:63:2c:61:65:73:31:32:38:2d s256-cbc,aes128-
00000200 63:74:72:2c:61:65:73:31:39:32:2d:63:74:72:2c:61 ctr,aes192-ctr,a
00000210 65:73:32:35:36:2d:63:74:72:2c:61:65:73:31:32:38 es256-ctr,aes128
00000220 2d:63:62:63:2c:61:65:73:31:39:32:2d:63:62:63:00 -cbc,aes192-cbc.
00000230 00:00:17:68:6d:61:63:2d:73:68:61:32:2d:32:35:36 ...hmac-sha2-256
00000240 2c:68:6d:61:63:2d:73:68:61:31:00:00:00:17:68:6d ,hmac-sha1....hm
00000250 61:63:2d:73:68:61:32:2d:32:35:36:2c:68:6d:61:63 ac-sha2-256,hmac
00000260 2d:73:68:61:31:00:00:00:09:6e:6f:6e:65:2c:7a:6c -sha1....none,zl
00000270 69:62:00:00:00:09:6e:6f:6e:65:2c:7a:6c:69:62:00 ib....none,zlib.
00000280 00:00:00:00:00:00:00:00:00:00:00:00 ............
-> NET_SSH2_MSG_KEXDH_INIT (since last: 0.0574, network: 0s)
00000000 00:00:00:20:d4:f2:2a:ee:1a:74:66:62:ac:00:7e:74 ... ..*..tfb..~t
00000010 0d:1b:4d:77:db:13:b2:c7:5b:64:25:8e:19:b1:23:12 ..Mw....[d%...#.
00000020 37:43:3e:2d 7C>-
<- NET_SSH2_MSG_KEXDH_REPLY (since last: 0.1535, network: 0.1535s)
00000000 00:00:01:17:00:00:00:07:73:73:68:2d:72:73:61:00 ........ssh-rsa.
00000010 00:00:03:01:00:01:00:00:01:01:00:8e:ec:e5:13:6f ...............o
00000020 a6:a7:d9:ba:17:26:1b:9f:35:01:00:e9:2a:76:0c:bd .....&..5...*v..
00000030 7d:01:f1:79:d6:ec:13:47:47:3e:37:a0:8a:9c:53:2e }..y...GG>7...S.
00000040 86:25:08:ff:63:06:3c:38:e9:ee:4a:84:a4:14:e2:8c .%..c..8..J.....
00000050 59:60:94:9a:37:1a:d2:74:63:eb:34:cf:0e:e1:51:3c Y`..7..tc.4...Q.
00000060 86:1c:8e:0a:ca:17:3b:d2:9b:53:80:9a:d5:88:b7:d8 ......;..S......
00000070 9f:9c:9a:9c:7b:ec:28:ec:31:f0:db:c3:74:74:4d:80 ....{.(.1...ttM.
00000080 75:09:59:0b:b1:d6:82:3a:c8:0a:b4:e8:55:cc:1f:78 u.Y....:....U..x
00000090 a3:ae:ed:ce:75:3c:37:99:3a:94:25:f2:99:63:c3:00 ....u.7.:.%..c..
000000a0 8c:b8:a6:1c:7d:19:96:41:42:2a:37:20:77:91:55:a1 ....}..AB*7 w.U.
000000b0 21:0c:bc:be:db:f6:7c:3f:d7:89:bc:82:48:f1:a7:f7 !.....|?....H...
000000c0 61:16:f2:f5:9d:c1:a4:19:61:b6:f3:dd:2a:b1:e7:b0 a.......a...*...
000000d0 46:47:de:28:4e:d9:5e:d5:a9:b9:27:72:06:cf:4c:5e FG.(N.^...'r..L^
000000e0 8f:9f:1b:3f:13:77:91:6c:93:76:d9:79:db:ae:58:ff ...?.w.l.v.y..X.
000000f0 24:49:29:79:01:29:64:81:5c:c2:1a:e1:1c:9e:f4:d4 $I)y.)d.\.......
00000100 f3:53:10:1f:c8:ea:36:41:d9:a4:a8:e7:61:05:26:8c .S....6A....a.&.
00000110 10:ef:ee:8b:15:66:fe:3a:ea:a7:2d:00:00:00:20:b1 .....f.:..-... .
00000120 29:b3:a7:04:ed:09:6b:8e:7e:b8:ab:5a:ab:79:15:e6 ).....k.~..Z.y..
00000130 dd:57:01:01:80:59:4c:2c:c0:e3:0d:27:0d:a6:52:00 .W...YL,...'..R.
00000140 00:01:0f:00:00:00:07:73:73:68:2d:72:73:61:00:00 .......ssh-rsa..
00000150 01:00:6d:fa:65:f3:58:b6:77:9f:94:6d:63:fa:be:8f ..m.e.X.w..mc...
00000160 1f:be:99:85:03:00:b7:f6:c4:20:89:79:23:49:b9:7b ......... .y#I.{
00000170 eb:a5:5a:99:23:ac:ef:a9:7d:ff:47:1a:b6:43:7c:56 ..Z.#...}.G..C|V
00000180 86:e3:6b:f7:b5:e9:76:be:74:e5:ef:1c:c4:03:bc:ef ..k...v.t.......
00000190 90:4e:b9:e3:2e:3e:89:63:0e:eb:0e:51:37:79:cf:ba .N...>.c...Q7y..
000001a0 86:90:9e:0b:92:c0:a5:cc:63:88:aa:19:e2:36:11:0f ........c....6..
000001b0 0c:6e:4c:cf:f7:cd:5b:0f:3d:33:ff:d8:c1:75:eb:e1 .nL...[.=3...u..
000001c0 e9:67:8a:66:ff:e0:a2:f1:5a:c2:29:90:41:b2:b5:a5 .g.f....Z.).A...
000001d0 27:da:4a:97:be:cc:cb:76:54:c4:41:28:b0:15:5a:11 '.J....vT.A(..Z.
000001e0 c0:dc:8a:2e:2d:6c:bc:12:6f:01:bf:47:88:84:a4:d2 ....-l..o..G....
000001f0 24:9d:e0:26:fe:7c:9d:30:47:c7:cb:c6:9e:fe:f5:43 $..&.|.0G......C
00000200 65:51:e3:4e:69:22:d4:69:e7:87:47:a5:09:0a:74:92 eQ.Ni".i..G...t.
00000210 80:86:70:20:d6:dc:0b:94:2c:39:78:d8:98:2a:c5:63 ..p ....,9x..*.c
00000220 a8:ad:8e:a4:9f:e7:69:58:f5:db:60:6f:13:1b:14:18 ......iX..`o....
00000230 36:f9:2e:5b:91:11:98:47:0f:24:05:06:18:40:46:9f 6..[...G.$...@F.
00000240 c7:1d:87:ee:fd:98:0e:67:0d:c9:57:0b:07:85:99:52 .......g..W....R
00000250 b0:4f .O
-> NET_SSH2_MSG_NEWKEYS (since last: 0.0637, network: 0s)
<- NET_SSH2_MSG_NEWKEYS (since last: 0, network: 0s)
-> NET_SSH2_MSG_SERVICE_REQUEST (since last: 0.0006, network: 0s)
00000000 00:00:00:0c:73:73:68:2d:75:73:65:72:61:75:74:68 ....ssh-userauth
<- NET_SSH2_MSG_SERVICE_ACCEPT (since last: 0.2068, network: 0.2068s)
00000000 00:00:00:0c:73:73:68:2d:75:73:65:72:61:75:74:68 ....ssh-userauth
-> NET_SSH2_MSG_USERAUTH_REQUEST (since last: 0.0001, network: 0s)
00000000 00:00:00:09:74:61:78:63:6f:6e:6e:65:78:00:00:00 ....xxxxxxxxx...
00000010 0e:73:73:68:2d:63:6f:6e:6e:65:63:74:69:6f:6e:00 .ssh-connection.
00000020 00:00:08:70:61:73:73:77:6f:72:64:00:00:00:00:08 ...password.....
00000030 70:61:73:73:77:6f:72:64 password
<- NET_SSH2_MSG_USERAUTH_BANNER (since last: 0, network: 0s)
00000000 00:00:00:23:53:53:48:20:53:65:72:76:65:72:20:73 ...#SSH Server s
00000010 75:70:70:6f:72:74:69:6e:67:20:53:46:54:50:20:61 upporting SFTP a
00000020 6e:64:20:53:43:50:0a:00:00:00:00 nd SCP.....
<- NET_SSH2_MSG_USERAUTH_SUCCESS (since last: 0.1186, network: 0.1186s)
-> NET_SSH2_MSG_CHANNEL_OPEN (since last: 0.0001, network: 0s)
00000000 00:00:00:07:73:65:73:73:69:6f:6e:00:00:01:00:7f ....session.....
00000010 ff:ff:ff:00:00:40:00 .....@.
<- NET_SSH2_MSG_CHANNEL_OPEN_CONFIRMATION (since last: 0.104, network: 0.0001s)
00000000 00:00:01:00:00:00:00:00:00:00:00:00:00:00:84:d0 ................
-> NET_SSH2_MSG_CHANNEL_REQUEST (since last: 0.0001, network: 0s)
00000000 00:00:00:00:00:00:00:09:73:75:62:73:79:73:74:65 ........subsyste
00000010 6d:01:00:00:00:04:73:66:74:70 m.....sftp
<- NET_SSH2_MSG_CHANNEL_WINDOW_ADJUST (since last: 0.1045, network: 0.0001s)
00000000 00:00:01:00:00:40:00:00 .....@..
<- NET_SSH2_MSG_CHANNEL_SUCCESS (since last: 0.0002, network: 0.0001s)
00000000 00:00:01:00 ....
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0001, network: 0s)
00000000 00:00:00:00:00:00:00:09:00:00:00:05:01:00:00:00 ................
00000010 03 .
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.1053, network: 0.0001s)
00000000 00:00:01:00:00:00:00:25:00:00:00:21:02:00:00:00 .......%...!....
00000010 03:00:00:00:13:6e:65:77:6c:69:6e:65:40:76:61:6e .....newline@van
00000020 64:79:6b:65:2e:63:6f:6d:00:00:00:01:0a dyke.com.....
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0001, network: 0s)
00000000 00:00:00:00:00:00:00:0e:00:00:00:0a:10:00:00:00 ................
00000010 01:00:00:00:01:2e ......
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.1102, network: 0.0001s)
00000000 00:00:01:00:00:00:00:37:00:00:00:33:68:00:00:00 .......7...3h...
00000010 01:00:00:00:01:00:00:00:01:2f:00:00:00:01:2f:00 ........./..../.
00000020 00:00:0f:00:00:00:00:00:00:04:00:00:00:01:2c:00 ..............,.
00000030 00:00:64:00:00:41:c0:5d:97:6b:1f:5d:97:6b:1f ..d..A.].k.].k.
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0002, network: 0s)
00000000 00:00:00:00:00:00:00:14:00:00:00:10:0b:00:00:00 ................
00000010 01:00:00:00:07:2f:4f:75:74:62:6f:78 ...../Outbox
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.1105, network: 0.0001s)
00000000 00:00:01:00:00:00:00:0e:00:00:00:0a:66:00:00:00 ............f...
00000010 01:00:00:00:01:30 .....0
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0001, network: 0s)
00000000 00:00:00:00:00:00:00:0e:00:00:00:0a:04:00:00:00 ................
00000010 01:00:00:00:01:30 .....0
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.105, network: 0.0001s)
00000000 00:00:01:00:00:00:00:2c:00:00:00:28:65:00:00:00 .......,...(e...
00000010 01:00:00:00:00:00:00:00:17:54:68:65:20:6f:70:65 .........The ope
00000020 72:61:74:69:6f:6e:20:63:6f:6d:70:6c:65:74:65:64 ration completed
00000030 00:00:00:00 ....
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0002, network: 0s)
00000000 00:00:00:00:00:00:00:14:00:00:00:10:0b:00:00:00 ................
00000010 01:00:00:00:07:2f:4f:75:74:62:6f:78 ...../Outbox
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.1094, network: 0.0001s)
00000000 00:00:01:00:00:00:00:0e:00:00:00:0a:66:00:00:00 ............f...
00000010 01:00:00:00:01:31 .....1
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0001, network: 0s)
00000000 00:00:00:00:00:00:00:0e:00:00:00:0a:0c:00:00:00 ................
00000010 01:00:00:00:01:31 .....1
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.1113, network: 0.0001s)
00000000 00:00:01:00:00:00:00:37:00:00:00:33:65:00:00:00 .......7...3e...
00000010 01:00:00:00:01:00:00:00:22:45:4f:46:20:72:65:61 ........"EOF rea
00000020 63:68:65:64:20:66:6f:72:20:4d:61:69:6c:62:6f:78 ched for Mailbox
00000030 20:5b:2f:4f:75:74:62:6f:78:5d:2e:00:00:00:00 [/Outbox].....
-> NET_SSH2_MSG_CHANNEL_DATA (since last: 0.0001, network: 0s)
00000000 00:00:00:00:00:00:00:0e:00:00:00:0a:04:00:00:00 ................
00000010 01:00:00:00:01:31 .....1
<- NET_SSH2_MSG_CHANNEL_DATA (since last: 0.105, network: 0.0001s)
00000000 00:00:01:00:00:00:00:2c:00:00:00:28:65:00:00:00 .......,...(e...
00000010 01:00:00:00:00:00:00:00:17:54:68:65:20:6f:70:65 .........The ope
00000020 72:61:74:69:6f:6e:20:63:6f:6d:70:6c:65:74:65:64 ration completed
00000030 00:00:00:00 ....
SFTP Log, используя метод nlist
-> NET_SFTP_INIT (0.0001s)
00000000 00:00:00:03 ....
<- NET_SFTP_VERSION (0.108s)
00000000 00:00:00:03:00:00:00:13:6e:65:77:6c:69:6e:65:40 ........newline@
00000010 76:61:6e:64:79:6b:65:2e:63:6f:6d:00:00:00:01:0a vandyke.com.....
-> NET_SFTP_REALPATH (0.0001s)
00000000 00:00:00:01:2e .....
<- NET_SFTP_NAME (0.1123s)
00000000 00:00:00:01:00:00:00:01:2f:00:00:00:01:2f:00:00 ......../..../..
00000010 00:0f:00:00:00:00:00:00:04:00:00:00:01:2c:00:00 .............,..
00000020 00:64:00:00:41:c0:5d:97:6b:1f:5d:97:6b:1f .d..A.].k.].k.
-> NET_SFTP_OPENDIR (0.0001s)
00000000 00:00:00:07:2f:4f:75:74:62:6f:78 ..../Outbox
<- NET_SFTP_HANDLE (0.1122s)
00000000 00:00:00:01:30 ....0
-> NET_SFTP_READDIR (0.0001s)
00000000 00:00:00:01:30 ....0
<- NET_SFTP_STATUS (0.1137s)
00000000 00:00:00:01:00:00:00:22:45:4f:46:20:72:65:61:63 ......."EOF reac
00000010 68:65:64:20:66:6f:72:20:4d:61:69:6c:62:6f:78:20 hed for Mailbox
00000020 5b:2f:4f:75:74:62:6f:78:5d:2e:00:00:00:00 [/Outbox].....
-> NET_SFTP_CLOSE (0.0001s)
00000000 00:00:00:01:30 ....0
<- NET_SFTP_STATUS (0.1084s)
00000000 00:00:00:00:00:00:00:17:54:68:65:20:6f:70:65:72 ........The oper
00000010 61:74:69:6f:6e:20:63:6f:6d:70:6c:65:74:65:64:00 ation completed.
00000020 00:00:00 ...