I use putty to connect to various Linux boxes. The home and end keys didn't work on the command line. This is how to fix it.
home
end
Edit /root/.bashrc (or whereever the home directory is for the current user)
/root/.bashrc
add export TERM=linux
export TERM=linux