Struggles with SFTP

chuggs

n3wb
Jul 30, 2018
1
0
Seattle
I picked up my first Dahua, last week, the IPC-K42A purchased from EmpireTech-Andy. I have hit a roadblock with setup that I can't seem to get past--the camera will not successfully connect with my SFTP server. Here are the details of my setup:

Device Type IPC-K42A
System Version V2.800.15OG006.0.R, Build Date: 2021-07-23
WEB Version V3.2.1.17174
ONVIF Version 20.06(V2.9.0.970440)

My SFTP server is just a FreeBSD 12.3 jail running sshd. I have verified I can successfully connect and write to it from several other machines and several other SFTP clients (macos native, gftp in Arch linux). Here are the logs when I connect from one of these clients and successfully write/delete a file:

Code:
Jun  5 21:10:12 surveillance sshd[66356]: Connection from 192.168.3.101 port 57410 on 192.168.3.206 port 22
Jun  5 21:10:12 surveillance sshd[66356]: Failed publickey for surveillance from 192.168.3.101 port 57410 ssh2: RSA SHA256:WiOE2GEwRx+YDrViFBGaKxPH3TZ0r8u23T/lkuyqDRA
Jun  5 21:10:12 surveillance sshd[66356]: Postponed keyboard-interactive for surveillance from 192.168.3.101 port 57410 ssh2 [preauth]
Jun  5 21:10:12 surveillance sshd[66356]: Postponed keyboard-interactive/pam for surveillance from 192.168.3.101 port 57410 ssh2 [preauth]
Jun  5 21:10:12 surveillance sshd[66356]: Accepted keyboard-interactive/pam for surveillance from 192.168.3.101 port 57410 ssh2
Jun  5 21:10:12 surveillance sshd[66356]: User child is on pid 66359
Jun  5 21:10:12 surveillance sshd[66359]: Changed root directory to "/mnt/"
Jun  5 21:10:12 surveillance sshd[66359]: Starting session: forced-command (config) 'internal-sftp -l INFO -f AUTH' for surveillance from 192.168.3.101 port 57410 id 0
Jun  5 21:10:12 surveillance internal-sftp[66360]: session opened for local user surveillance from [192.168.3.101]
Jun  5 21:10:12 surveillance internal-sftp[66360]: opendir "/surveillance"
Jun  5 21:10:12 surveillance internal-sftp[66360]: closedir "/surveillance"
Jun  5 21:10:15 surveillance internal-sftp[66360]: open "/surveillance/update.rb" flags WRITE,CREATE,TRUNCATE mode 0666
Jun  5 21:10:15 surveillance internal-sftp[66360]: close "/surveillance/update.rb" bytes read 0 written 1416
Jun  5 21:10:17 surveillance internal-sftp[66360]: opendir "/surveillance"
Jun  5 21:10:17 surveillance internal-sftp[66360]: closedir "/surveillance"
Jun  5 21:10:31 surveillance internal-sftp[66360]: remove name "/surveillance/update.rb"
Jun  5 21:10:31 surveillance internal-sftp[66360]: opendir "/surveillance"
Jun  5 21:10:31 surveillance internal-sftp[66360]: closedir "/surveillance"
Jun  5 21:10:33 surveillance internal-sftp[66360]: session closed for local user surveillance from [192.168.3.101]
Jun  5 21:10:33 surveillance sshd[66359]: Received disconnect from 192.168.3.101 port 57410:11: disconnected by user
Jun  5 21:10:33 surveillance sshd[66359]: Disconnected from user surveillance 192.168.3.101 port 57410

However, the camera can't seem to do this. Any time it attempts to do so, in the server logs I see:

Code:
Jun  5 21:07:02 surveillance sshd[65991]: Connection from 192.168.200.3 port 52698 on 192.168.3.206 port 22
Jun  5 21:07:02 surveillance sshd[65991]: Received disconnect from 192.168.200.3 port 52698:11: Normal Shutdown, Thank you for playing [preauth]
Jun  5 21:07:02 surveillance sshd[65991]: Disconnected from authenticating user surveillance 192.168.200.3 port 52698 [preauth]

Using the "test" button in the camera only results in the cryptic error "Right verification failure".

My search for a solution hasn't turned much up. I found this discussion on a German forum, but the only proposed solution is to update the firmware. The firmware on my camera is relatively new, and I can't find anything newer. The preauth failure seems to indicate that the Dahua software is failing to initate the SSH connection correctly, but I can't seem to find any leads on how or why.

Anyone run in to this before, or is anyone successfully using SFTP from their Dahua devices?
 
I did not succeed to connect my Dahua cameras on SFTP also, and I use FTP in LAN ( vsftpd server BSD ) for a year without any problem.
 
We must be missing something? Years later the same issue still exists...
Same problem with IPC-HDW2441T-S Camera, No problem accessing Synology NAS in SFTP mode using various clients but Dahua Camera cant write to the NAS, tried changing to "Compatible Mode" and still get the misspelled message "Right verification failure". At least the spelling error makes an internet search easier...
System Version V2.840.0000000.20.R, WEB Version V3.2.1.2305648