Wednesday, August 13, 2014

Failsafe OpenWrt

Ketika tiba-tiba salah hapus file pada saat ingin menghapus package menyebabkan connection ssh pada openWrt ditolak, Panik! Debrick? Tapi karena di ping ke 192.168.1.1 masih bisa berarti masih ada secercah harapan.

Salah satu fitur dari openWrt adalah booting dengan failsafe-mode.

Berikut dokumentasi failsafe-mode pada router MR3220.

1. Matikan router, cabut kabel WAN, konek via LAN port ke PC
2. Set IP PC ke 192.168.1.2, 255.255.255.0
3. Tekan dan tahan tombol reset lalu nyalakan router
4. Maka led setting akan berkedip-kedip semakin cepat,
5. Masuk ke Terminal, login dengan: telnet 192.168.1.1
6. Ketik passwd untuk membuat password login SSH
7. reboot

Coba cek ssh ternyata masih refused? wah.. mulai panik.. Tapi led port lan mulai menyala.
7. Ganti IP ke automatic dhcp
8. Kembali cek ssh
9. Hapus dulu fingerprint RSA lama: ssh-keygen -f "/home/adi/.ssh/known_hosts" -R
10. OK lanjtkan oprek!
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
18:d3:43:30:a4:30:26:43:05:d1:b0:c7:6c:b6:51:64.
Please contact your system administrator.
Add correct host key in /home/adi/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/adi/.ssh/known_hosts:1
  remove with: ssh-keygen -f "/home/adi/.ssh/known_hosts" -R 192.168.1.1
RSA host key for 192.168.1.1 has changed and you have requested strict checking.
Host key verification failed.
adi@adi-Satellite-M300:~$ ssh-keygen -f "/home/adi/.ssh/known_hosts" -R 192.168.1.1
# Host 192.168.1.1 found: line 1 type RSA
/home/adi/.ssh/known_hosts updated.
Original contents retained as /home/adi/.ssh/known_hosts.old


No comments:

Post a Comment