Answers:
登录后,您可以执行以下操作:
export TERM=vt100
sshd进程(来自sshd(8))将读取...
6. Reads the file ~/.ssh/environment, if it exists, and users are
allowed to change their environment. See the PermitUserEnvironment
option in sshd_config(5).
和
8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists,
runs it; otherwise runs xauth. The “rc” files are given the X11
authentication protocol and cookie in standard input. See SSHRC, below.
您可能希望编辑~/.ssh/rc
以设置TERM的值,因为此文件是在Shell的配置文件之前读取的。
通常TERM
是从本地环境(不变)传递到远程环境。如果您TERM
在调用时在本地进行设置ssh
,则将完成所需的操作。
例如,如果远端具有rxvt
(但没有rxvt-unicode
)的终端说明,那么对于功能键等来说就足够了。
假设bash或某些符合POSIX的shell,您可以通过以下方式执行此操作
TERM=rxvt ssh
远程主机
这样做只会影响ssh
命令,而不会影响您的本地环境。我使用此功能来处理没有描述的典型机器screen.xterm-new
。根据远程计算机的不同,可能会或可能不会为整个终端数据库安装合适的软件包。有些(例如Solaris和FreeBSD)需要解决方法。
进一步阅读:
/usr/share/terminfo/
。