SSH and command line 'Q'

I have a problem which is not directly to do with q, but to do withthe use of q under SSH.My local machine is a windows laptop, and I’m trying to run q on aremote machine which is a multi core linux box. I access the remotelinux box via SSH using the SSH client called Putty.It’s no problem to get SSH access a bash session on the remote box BUTthere is a problem when I run the q interactive interpreter from thatbash session.Problem: all the arrow keys stop working which makes Q really hard touse.If I press the up-arrow key then ^[[A appears on the q command lineand the previous command does not appear. Which is different to thebash shell where up arrow does work. All the arrow keys aresimilarly effected.I’ve googled and read all day but can’t seem to find a solution whichis very annoying because “up arrow” is so important to use of qinterpreter.Any thoughts? I’m asking because I’ve run out of ideas. And becausethis issue does seem to be with q, because the bash shell correctlyhandles arrows.