tab and arrow keys weird behavior in redhat
<p>I am facing some weird behavior when trying to ssh to the server by using either <code>Iterm2</code> or OSX <code>Terminal</code>. Basically, the issue is when using <code>tab</code> for auto-completion, it will print one more random extra char in the end, for example: </p>

<pre><code>//the 'e' is extra in this case
$ cd keys/e
</code></pre>

<p>And when trying to use any arrow keys for navigation, it basically does not work at all.</p>

<pre><code>//^[[C^[[C^[[C^[[C^[[C^[[C^[[C are printed by pressing arrow keys
$ cd keys/^[[C^[[C^[[C^[[C^[[C^[[C^[[Ce

//Kernel Version
OS Version: 2.6.39-400.246.2.el6uek.x86_64

//Distribution Information
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
</code></pre>

<p>But it works just fine in my macbook, I was guessing it is caused by my server profile setting up, but I have double-checked that I do not have either of the following files in my home:</p>

<pre><code>$ vi .bash_profile
$ vi .bashrc
</code></pre>

<p>Any help will be appreciated.</p>