i am not able to recall the command typed earlier in unix

i am not able to recall the command typed earlier in unix whenever i press esc key ^[ comes on the unix prompt . so esc k isnt working for me
whenever i press backspace key i get ^H on my unix cursor

need help

For the escape key to work, use set -o vi.
For erase character, stty erase ^H (replace ^H by hitting backspace key)

Put the commands in the .kshrc in your home directory. This will only work on ksh and sh.