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
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
According to this website , you'd need to set the TERM
environment variable to 'xterm'.
However, according to the paramiko documentation , you can tell invoke_shell
to emulate a terminal type like so:
ssh.invoke_shell(term='xterm')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.