I have installed recent version of OpenWRT to my Netgear R6100 router and tried to apply Terraform plan to it and now I can not login to the router.
It is not accepting my ssh password and ssh is the only open port.
But the real problem is that router still asks for a ssh password in failsafe mode! (it is not accepting my password)
Trying to factory reset leads to nothing.
Make sure that you're actually trying to connect to the R6100.
Specifically:
disable wifi on your computer
make sure there is one (and only one) ethernet connection: between the lan port on the R6100 and your computer. No other ethernet connections to the router or to your computer
verify that you have set the static IP properly on your computer (to join the 192.168.1.0/24 network, not using the .1 address)
Ensure that the R6100 is actually in failsafe mode (you will see continuous rapid blinking of one of the LEDs).
Try ssh again, using user root (ssh root@192.168.1.1)
I connected router to notebook directly no other networks connected to notebook. I am pretty sure I am connecting to that OpenWRT router and nothing else.
I didn't call you stupid... you'd be surprised how often there is a similar situation where the user doesn't realize that another network connection was active such that the computer doesn't actually send packets to the OpenWrt router. Or they missed something in the prerequisite setup of failsafe mode. It's not stupidity, but rather a bunch of easily overlooked items.
this can easily be verified by simply unplugging the R6100. Again, not stupidity, but a worthwhile sanity check.
What version did you install?
Did you download it directly from openwrt.org?
Did you customize the image in any way?
A "factory" reset (to OpenWrt defaults) consists of allowing OpenWrt to boot fully then press and hold down the reset button until the lights start blinking (5 seconds) then release button and wait for reboot.
This model also accepts NMRP to de-brick. Use NMRP to send a "factory" OpenWrt file.
OpenWrt (in the default/standard image) does not have a password, but you will be prompted for one if the ssh connection is with any username other than root.
If another host on your network is responding to 192.168.1.1, that could also cause this behavior.
Or if you have an image that didn't come from openwrt.org and/or if it was custom build/image that contains a pre-defined password and/or other configs.
Do not customize the above... just work with the default.
triple check that it is OpenWrt/R6100 that is responding to your ssh connection attempts and that there is positively nothing else that could be responding to you on that address.
and verify that your ssh client is making the connection attempt with user root.
I know I said these things before, and I am repeating these things only because it's easy to overlook one or more of these things (as I also said before, it's not about stupidity).