1. Current Location: Home >  Xiaomi (MIWiFi) >  Xiaomi AX3000T Unlocks SSH and uploads files with SCP, and an error will be displayed after 20K

Xiaomi AX3000T Unlocks SSH and uploads files with SCP, and an error will be displayed after 20K

Xiaomi AX3000T official firmware write limit of 20 KB" problem, the symptom is that as long as the file is transferred with scp as long as it exceeds 20 KB, an error will be reported, and it is basically certain that /usr/sbin/dropbear or /usr/bin/dbclient in the official firmware has been added by Xiaomi with a hard-coded limit. It is used to prevent people from dragging large third-party packages (such as ShellClash, OpenClash, etc.) into the router at once. The simple understanding is:

Xiaomi AX3000T Unlocks SSH and uploads files with SCP, and an error will be displayed after 20K

  1. SSH can be connected, but SCP will call DropBear's dbclient as an encrypted channel, and Xiaomi will write the dbclient single receive buffer to 20 KB;
  2. local scp will send a payload of 32 KB~64 KB at a time by default, so it is rejected by the peer dropbear as soon as the first frame is sent, and the client side immediately reports "lost connection" or "broken pipe".
  3. When
    file ≤ 20 KB, it can be installed in one frame and does not trigger this protection, so it looks "small file normal".
There are only two possible bypass methods, and there is no solution that can be broken through by simply changing command parameters
A. Cut large files into small pieces of ≤ 20 KB on your PC
  • Linux / macOS
    split -b 19k bigfile.bin chunk_ # 19 KB per block for f in chunk_*; do scp "$f" root@192.168.31.1:/tmp/ done ssh root@192.168.31.1 'cat /tmp/chunk_* > /tmp/bigfile.bin; rm /tmp/chunk_*'
  • Windows(PowerShell)
    1..20 | % { $s=19kb; $i=$_; $b=[io.file]::ReadAllBytes("bigfile.bin") [io.file]::WriteAllBytes("chunk_$i",$b[($i-1)*$s.. ($i*$s-1)]) }
cut and drag in one by one with WinSCP, and then merge cat in the router.
assume that chunk_aa chunk_ab chunk_ac ... has already been put in /tmp:
cd /tmp cat chunk_* > object filename.bin
B. Directly replace the restricted dropbear
first flash the router to "official modification" or third-party firmware (such as OpenWrt, Padavan, X-Wrt), these firmware use the original dropbear/openssh, there is no 20 KB limit, and it is no problem to scp hundreds of megabytes at a time. But brushing is risky to prevent accidental bricks.
use Plan A for temporary emergencies, and if you want to cure it, you can only go to Plan B. There is no news on whether the official will lift this restriction in the future, and there is still a 20 KB ceiling in the actual test of new firmware versions such as 1.0.80/1.0.84.
Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《Xiaomi AX3000T Unlocks SSH and uploads files with SCP, and an error will be displayed after 20K
Article URL: https://www.shunot.com/en/miwifi/681.html
Unless otherwise stated, all articles are original by 《Routing enthusiast》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Comment List

Xiao Ai
Xiao AiReply
#31
Xiaomi's AX3000T's SCP restrictions are really pitted, and large file transfers are directly stuck, and it is troublesome to split them. Hopefully, more customization options will be opened in the future to give users more freedom.
4 个月前
The desert is lon...
The desert is lon...Reply
#30
Xiaomi AX3000T's SCP restrictions are really pitted, and large file transmissions are blocked, and they can only be uploaded in chunks, which is troublesome. It is hoped that the subsequent firmware can be optimized to improve the user experience.
4 个月前
And listen to the...
And listen to the...Reply
#29
Xiaomi AX3000T's SCP restrictions are really pitted, and large file transmissions are directly disconnected, resulting in a poor experience. It's too troublesome to cut into small pieces, and I hope it will be fixed soon.
4 个月前
Coffee time
Coffee timeReply
#28
Xiaomi AX3000T's SCP restrictions are quite pitfalls, large file transmission is directly stuck, but small files are normal. The official hardcoded 20KB limit is obviously to prevent flashing, but the user experience is too poor, and I hope it can be optimized in the future.
4 个月前
Shimmer
ShimmerReply
#27
This limitation is really a pit and affects the efficiency of file transfer. Although there are solutions in the future, it is still quite troublesome for users. I hope the official can optimize it as soon as possible.
4 个月前
Qinghuan Ferry
Qinghuan FerryReply
#26
This limitation is really annoying and affects the efficiency of uploading large files. Hopefully, Xiaomi can fix it as soon as possible to make the user experience smoother.
4 个月前
The evening breez...
The evening breez...Reply
#25
Xiaomi AX3000T's SCP limit is indeed pit, large file transmission is directly stuck, but small files are normal. It is recommended that the official optimize and don't let users take detours.
5 个月前
The flowers have ...
The flowers have ...Reply
#24
This limitation is indeed a pit and affects the efficiency of file transfer. Small files are fine, but large files have to be divided, which is troublesome. I hope the official can fix it sooner, the user experience is too bad.
5 个月前
Boiling wine and ...
Boiling wine and ...Reply
#23
This restriction is quite tasteless, obviously SSH can be used, but it restricts scp from transferring large files, affecting the user experience. Hopefully a future update will fix this.
5 个月前
The mountains and...
The mountains and...Reply
#22
Xiaomi AX3000T's SCP restrictions are indeed pitted, and large file transfers are blocked, affecting the user experience. It is recommended that the official consider the needs of users and adjust the restrictions appropriately to avoid inconvenience to users.
5 个月前
Memorial night
Memorial nightReply
#21
Xiaomi AX3000T's SCP restrictions are really tricky, and the transfer of large files is directly stuck, and even cutting small pieces is troublesome. I hope it can be optimized in the future, and don't let users toss.
5 个月前
Quiet beautiful man
Quiet beautiful manReply
#20
Xiaomi AX3000T's SCP limit is really pitted, large file transmission is blocked, and manual sharding is troublesome. It is recommended that the official open more customization options, poor user experience.
5 个月前
In-depth reader
In-depth readerReply
#19
Xiaomi's AX3000T's SCP restrictions are really tricky, large file transmission is directly stuck, and small files are normal, which is obviously deliberately designed. It took a while to find a solution, and it is recommended that the official open more customization options.
5 个月前
How can one repay...
How can one repay...Reply
#18
Xiaomi AX3000T's SCP restrictions are really pitted, large file transmission is directly stuck, but small files can be uploaded normally. This kind of hard-coded limitation is helpless, obviously SSH can be used, but due to different transmission methods, the experience has dropped off a cliff, and it is recommended that the official consider optimization.
5 个月前
The sea is wide a...
The sea is wide a...Reply
#17
This limitation is really troublesome, and there are always errors when uploading large files, and it is time-consuming to segment and time. I hope that the official can consider the needs of users and appropriately relax the restrictions, after all, some tools do require greater transmission capacity.
5 个月前

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow