niceboygithub / AqaraM1SM2fw

Aqara Gateway M1S (ZHWG15LM) , P3(KTBL12LM), H1(QBCZWG11LM), M2 (ZHWG12LM) Firmwares
164 stars 27 forks source link

Official Firmware 3.4.4_0008.0616 Telnet Locked Out #47

Closed aminhusni closed 2 years ago

aminhusni commented 2 years ago

I accidentally left auto update on and it updated to this official firmware. The device is now locked out and I can't get back telnet access.

I used this to open up telnet:

miiocli device --ip 192.168.0.155 --token TOKEN_REMOVED raw_command set_ip_info '{"ssid":"\"\"","pswd":"123123 ;  /bin/riu_w 101e 53 3012 ; telnetd"}'
Running command raw_command
['ok']

Telnet seems to have opened but it closes the connection as soon as I connect to it.

Trying 192.168.0.155...
Connected to 192.168.0.187.
Escape character is '^]'.
Connection closed by foreign host.
aminhusni commented 2 years ago

False alarm. Issued the incorrect command. Correct payload is '{"ssid":"\"\"","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}'