I used rlwrap because with telnet session arrow keys were not working, after starting telnet session with rlwrap am not able to edit the file in using vi editor.
Whether its problem with rlwrap.If i don't use arrow keys wont work in my telnet session.