python3学习手册port = 22 timeout = 20 # 单位:秒 client1 = paramiko.client.SSHClient() client1.set_missing_host_key_policy(paramiko.AutoAddPolic y()) # 允许连接不在know_hosts文件里的主机 try: client1.connect(hostname=hostname, port=port AuthenticationException as e: print(f"Authentication Error: {e}") exit() stdin, stdout, stderr = client1.exec_command("ls -l") # 执行一次性命令 # stdout.read() #返回bytes # stdout.readlines() print("## 请输入:要执行的命令,最后按Ctrl+D结束输入 ##") input_list = sys.stdin.readlines() # 输入要执行的命令 client1 = paramiko.SSHClient() client1.set_missing_host_key_policy(paramiko.AutoAddPolic y()) # 自动添加服务器的ssh密钥,允许连接不在know_hosts文件里的0 码力 | 213 页 | 3.53 MB | 1 年前3
k8s操作手册 2.3kube/config文件中 # kubectl config set-creden�als kube-user01 --embed-certs=true \ --client-cer�ficate=/etc/kubernetes/pki/kube-user01.crt \ --client-key=/etc/kubernetes/pki/kube-user01.key #创建context上下文 # kubectl config0 码力 | 126 页 | 4.33 MB | 1 年前3
The DevOps HandbookFIND AND FILL ANY TELEMETRY GAPS i. Expand metrics from business, application, infrastructure, client software, and deployment pipeline levels 1. With every production incident identify missing telemetry0 码力 | 8 页 | 24.02 KB | 5 月前3
共 3 条
- 1













