I encountered, for some time now, problems when connecting over ssh from my mac to a linux machine.
These problems were related to backspace/delete key in both nano and zsh the solutions I found today are :