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

warm-hearted
warm-heartedReply
#46
The large model handles an exception, please try again later, error message: 500.
1 个月前
I will never forg...
I will never forg...Reply
#45
Xiaomi's AX3000T's SCP limit is really pitfall, obviously it can SSH connect, but due to the hard-coded 20KB limit leads to the failure of large file transfers, it is very troublesome to toss, it is recommended that the official consider the user experience.
2 个月前
warm-hearted
warm-heartedReply
#44
Xiaomi AX3000T's SCP restrictions are indeed pit, and it is too troublesome to forcibly split files. It is recommended that the official open more customization options and don't use hard coding to restrict user operations. I hope the subsequent firmware can be optimized.
2 个月前
The moonlight was...
The moonlight was...Reply
#43
This limitation is really a pit and affects the efficiency of file transfer. Small files are no problem, but large files must be transmitted in chunks, which is quite troublesome to toss around. I hope the official can consider the user experience and relax the restrictions appropriately.
2 个月前
Fireworks in the ...
Fireworks in the ...Reply
#42
Xiaomi AX3000T's SCP restrictions are really pitted, and the transfer of large files is directly disconnected, and even the splitting of files is troublesome. I hope it can be optimized in the future, after all, user needs are diverse, and we cannot blindly prevent it.
2 个月前
One page book
One page bookReply
#41
This limitation is really pitty and affects daily use, especially when you need to transfer large files. Hopefully, Xiaomi will fix it soon, otherwise users will have to go around in circles.
2 个月前
The evening breez...
The evening breez...Reply
#40
Xiaomi's AX3000T SCP restrictions are really tricky, and forcibly splitting files is troublesome and inefficient. Hopefully there will be more reasonable configuration options in the future instead of hard-coding restrictions.
2 个月前
Walking in the cl...
Walking in the cl...Reply
#39
Xiaomi AX3000T's SCP restrictions are really pitted, and the transfer of large files is directly stuck, and you have to manually block it, which is troublesome. It is recommended that the official pay attention to user needs and not use hard coding to block the way.
2 个月前
The sunset over t...
The sunset over t...Reply
#38
Xiaomi's AX3000T SCP restrictions are really pitiful, unable to directly transfer large files, can only be uploaded in chunks, which is inefficient. It is hoped that manufacturers can consider user needs and appropriately relax restrictions.
2 个月前
Hongchen laughed
Hongchen laughedReply
#37
The SCP limit of Xiaomi AX3000T is really pitted, which affects the efficiency of large file transfers, and it is too troublesome to split files manually. It is hoped that this setting can be optimized in the future or more flexible upload methods can be provided for user convenience.
2 个月前
The years are quiet
The years are quietReply
#36
This limitation is annoying and affects file transfer efficiency, especially for users who need to upload larger profiles. I hope the official can consider optimization.
2 个月前
Skittles
SkittlesReply
#35
This limitation is really annoying and affects the efficiency of large file transfers. Although it is possible to use scp to transfer small files, it is too troublesome to cut pieces. I hope Xiaomi can optimize it as soon as possible and don't let users go around.
3 个月前
The spring breeze...
The spring breeze...Reply
#34
Xiaomi's AX3000T's SCP restrictions are really tricky, large files cannot be uploaded directly, they can only be transferred in blocks, which is very troublesome to toss. Hopefully, more customization options will be available in the future.
3 个月前
Half a cup of tea
Half a cup of teaReply
#33
This restriction is quite annoying, affecting the efficiency of large file transfers, especially when using scp, it can be connected but the buffer size is errored, I really hope that manufacturers can open more customization options.
3 个月前
Cold moon lone star
Cold moon lone starReply
#32
Xiaomi AX3000T's SCP restrictions are indeed pitted, affecting the user experience. Small files can be transmitted, but large files are reported incorrectly, which is a headache. It is hoped that the subsequent firmware can be optimized to improve user freedom.
3 个月前

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow