How to Fix Broken Nano Editor in Cmder

Sometimes weird things happened when I’m editing a file using nano in cmder. Missing spaces, characters, inconsistent display when editing are just a few problems that happened to me when using nano in cmder.

Editing hosts file with nano and cmder

See the gif above. You want to know how to fix the broken nano in cmder? Follow these simple steps.

#1 Check your SSH

Yours might using the Windows OpenSSH when running SSH via cmder. You may check by running which ssh from cmder.

If you are using Windows OpenSSH, the result would be as follows:

#2 Add new SSH PATH

In order to change the default SSH in cmder, you need to add a new SSH path above the existing Windows SSH record.

I use the SSH inside git-for-windows/usr/bin folder.

Edit environment variable

Then restart your terminal. You should be able to use nano without any problem.