WARNING: terminal is not fully functional
ssh连接服务器时,使用less或vim提示如下信息
WARNING: terminal is not fully functional
- (press RETURN)
其原因是目标机器没有你带过去的terminfo. 例如,我如果使用urxvt或者xterm,带过去的TERM
环境变量可能就是目标机器已经有的,所以支持,可以很好的展示颜色,超链接等。如果我用小众一点的terminal emulator,例如kitty,带过去的TERM环境变量可能不受目标机器支持。当然,兼容性最好的是xterm. 所以要么在目标机器bashrc里面export TERM=xterm
或者xterm-256color
,亦或是安装相应terminal的terminfo. 例如kitty的kitty-terminfo
. 此外,ncurses-term
里面包含了大量terminfo,可以先装下这个。
参考:https://www.linuxquestions.org/questions/ubuntu-63/terminal-is-not-fully-functional-410946/
sftp error: Received message too long
sftp连接服务器时,如果报这个错,基本上是因为连上ssh后有标准输出,这使sftp不知道干啥,所以报错。
This output confuses the sftp/scp client. You can verify if your shell is doing this by executing:
ssh <yourhost> /usr/bin/true
If the above command produces any output, then you need to modify your shell initialization.
确保连上ssh之后不会有任何输出。