Skip to content

在远程服务器执行命令并得到执行结果,基于 paramiko 。

License

Notifications You must be signed in to change notification settings

gqylpy/gqylpy-ssh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LOGO Release Python Versions License Downloads

gqylpy-ssh

在远程服务器执行命令并得到执行结果,它是对 paramiko 库的二次封装。在 Command 对象中,提供了多种方法用于判断命令执行结果是否如期。

pip3 install gqylpy_ssh

>>> from gqylpy_ssh import GqylpySSH, Command

>>> ssh = GqylpySSH('192.168.1.7', 22, username='gqylpy', password=...)

>>> c: Command = ssh.cmd('echo Hi, GQYLPY')
>>> c.status_output
(True, 'Hi, GQYLPY')

About

在远程服务器执行命令并得到执行结果,基于 paramiko 。

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages