'xterm-new': unknown terminal type

Error replication:

  • I am using iTerm2 on a Macbook (OS X Yosemite)

  • I ssh to the remote instance and tried to run the command clear, and this error will be shown:

    'xterm-new': unknown terminal type.

  • Not only for the command clear, but for several other commands, the same error is displayed, and the command does not execute as expected.

  • The error only occurs when I use iTerm2, and not when I use the default Mac terminal. Therefore, I assume that this problem has something to do with iTerm2, not the virtual machine.

How can I solve this problem with iTerm2?

+4
source share
1

mikyra, , TERM = xterm-256color .

:

# Run the following commands on the local machine bash prompt
echo "export TERM=xterm-256color" >> ~/.bashrc
source ~/.bashrc

ssh , . xterm- .

+10

All Articles