# pyssh_util **Repository Path**: ttutils/pyssh_util ## Basic Information - **Project Name**: pyssh_util - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-15 - **Last Updated**: 2024-06-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

pyssh_util

- ssh_util.py ssh到服务器的各种封装方法,使用示例: ```python host = '' password = '' ssh = SSHClient(host, password) # 执行单行命令 result_single = ssh.execute_command('ls -l') # 执行多行命令 commands = ['pwd', 'whoami'] result_multiple = ssh.execute_commands(commands) # 上传并执行脚本 local_script_path = 'C:\\Users\\buyfakett\\Desktop\\1.sh' remote_script_path = '/root/1.sh' result_script = ssh.upload_and_execute_script(local_script_path, remote_script_path) ssh.close() ```