Pexpect pxssh 连接时指定cipher

在/etc/ssh/ssh_config中添加远程服务器支持的cipher

如Ciphers aes128-cbc,3des-cbc,aes128-ctr

 

 连接时指定ssh配置文件

from pexpect import pxssh

client = pxssh.pxssh()
clinet.loggin("host","user","pass",ssh_config="/etc/ssh/ssh_config")
client.sendline('')
client.logout()

 

https://github.com/pexpect/pexpect/blob/master/pexpect/pxssh.py

posted @ 2020-03-12 17:45  QQQnull  阅读(227)  评论(0编辑  收藏  举报