[英]How to connect to a linux server only support xterm terminal
I want to ssh to a server with paramiko
modules, but when I do this, Get the server respons like: Error:only support xterm terminal 我想通过ssh到带有
paramiko
模块的服务器,但是当我这样做时,使服务器响应如下:错误:仅支持xterm终端
Connect code: 连接代码:
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname=blip,username=bluser,password=blpasswd)
channel = ssh.invoke_shell()
How can I set the terminal type? 如何设置终端类型? My evn: OS:windows 7 IDE:pycharm python version:3.4
我的EVN:OS:Windows 7 IDE:pycharm python版本:3.4
According to this website , you'd need to set the TERM
environment variable to 'xterm'. 根据此网站 ,您需要将
TERM
环境变量设置为'xterm'。
However, according to the paramiko documentation , you can tell invoke_shell
to emulate a terminal type like so: 但是,根据paramiko文档 ,您可以告诉
invoke_shell
模拟终端类型,如下所示:
ssh.invoke_shell(term='xterm')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.