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

A gentle breeze b...
A gentle breeze b...Reply
#16
Xiaomi AX3000T's SCP restrictions are really pitted, and uploading large files must be segmented, which is troublesome to operate. It is recommended that officials consider user experience and appropriately relax restrictions.
5 个月前
Laugh and sigh at...
Laugh and sigh at...Reply
#15
Xiaomi AX3000T's SCP restrictions are indeed pitted, and small files are normal and large files have errors, affecting the user experience. It is recommended that the official optimize or provide more flexible configuration options, after all, users have reasonable needs.
5 个月前
Cold moon lone star
Cold moon lone starReply
#14
Xiaomi AX3000T's SCP restrictions are indeed pitted, large files cannot be directly transferred, and can only be uploaded in chunks, which is cumbersome to operate. I hope it can be optimized in the future to improve the user experience.
5 个月前
North of Beicheng
North of BeichengReply
#13
Xiaomi AX3000T's SCP limit is really pitted, and large file transfers often make errors, and it is troublesome to segment. I hope it can be optimized in the future, otherwise it will be too time-consuming to toss.
5 个月前
The word "heart" ...
The word "heart" ...Reply
#12
Xiaomi AX3000T's SCP limit is really pitted, and it is too troublesome to force block transmission. It is recommended that the official open more customization options, so that users can use it more freely. I hope it can be improved in the future.
5 个月前
Coffee time
Coffee timeReply
#11
Xiaomi AX3000T's SCP restrictions are indeed pitfalls, forcibly limiting file sizes affects the user experience. I hope to optimize it in the future, or open up more customization options to make the router more flexible.
5 个月前
Time is like a song
Time is like a songReply
#10
Xiaomi AX3000T's SCP restrictions are indeed pitted, small files are no problem, and large files are directly disconnected. This hard-coded limitation is a headache, and it is recommended to open it up or adjust the parameters for user convenience.
5 个月前
Long Street Chief
Long Street ChiefReply
#9
This limitation is really a pit, forcibly limiting the file size affects the user experience, especially for users who need to transfer larger profiles. I hope the official can consider optimization.
5 个月前
Son of the wind
Son of the windReply
#8
This limit is indeed a pit, and forcibly limiting the file size affects the user experience. Hope to fix it soon, after all, SCP uploading large files is a common requirement, and the hardcoding limit is a bit unreasonable.
5 个月前
Cool summer breeze
Cool summer breezeReply
#7
Xiaomi AX3000T's SCP restrictions are indeed pitted, and the upload of large files is directly disconnected, and even the official did not expect users to use this function. The bypass method is complicated and the user experience is too poor.
5 个月前
Story Museum
Story MuseumReply
#6
Xiaomi AX3000T's SCP restrictions are indeed pitted, small files can be transferred, and large files are directly disconnected, affecting the user experience. It is recommended that the official consider the actual needs of users and appropriately relax restrictions.
6 个月前
bookworm
bookwormReply
#5
Xiaomi AX3000T's SCP restrictions are really pitted, large file transmissions are blocked, and it is troublesome to split. I hope that the subsequent firmware can be optimized, so don't let users toss.
6 个月前
The wild geese fl...
The wild geese fl...Reply
#4
Xiaomi AX3000T's SCP restrictions are indeed pitted, and large file uploads are directly disconnected, affecting the user experience. Although there is a solution, it is cumbersome and impersonal, and it is recommended to optimize it officially.
6 个月前
Idle clouds and w...
Idle clouds and w...Reply
#3
This limitation is really annoying and affects the efficiency of file transfers. Fortunately, there is a way around it, but it is troublesome to operate. It is hoped that the official can consider the needs of users and appropriately relax the restrictions.
6 个月前
Tears flowed
Tears flowedReply
#2
Xiaomi's AX3000T's SCP limit is indeed pit, and the forced 20KB upper limit affects the user experience. Small files are normal, large files report errors, and forcibly divide the trouble. I hope the official can optimize it, after all, the SSH function should be more flexible.
6 个月前

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow