How to fix OpenWRT Failsafe mode SSH port 22: Connection refused


You are trying to connect to your OpenWRT router in failsafe mode using SSH using ssh, but you see this error message:

ssh: connect to host port 22: Connection refused


First, check if you have the correct IP configuration:

  • Ensure your computer is ONLY connected to the Ethernet interface connected to OpenWRT
  • Ensure you have set the Ethernet port to the static IP , netmask (prefix length 24), gateway none or

Ping to verify your IP configuration:


Example output:

uli@uli-computer:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=63 time=1.20 ms
64 bytes from icmp_seq=2 ttl=63 time=1.35 ms
64 bytes from icmp_seq=3 ttl=63 time=1.14 ms

Then, try connecting again using SSH:

ssh [email protected]

If you’re still getting a

ssh: connect to host port 22: Connection refused

you are running an old OpenWRT version. SSH in failsafe mode is only supported since OpenWRT 15.05. For older versions, use telnet to connect:


and you should see a root shell:

Connected to
Escape character is '^]'.

 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH

BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ATTITUDE ADJUSTMENT (12.09, r36088)
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice