Notice
														
												
											
												
												
													Recent Posts
													
											
												
												
													Recent Comments
													
											
												
												
													Link
													
											
									| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 | 
| 12 | 13 | 14 | 15 | 16 | 17 | 18 | 
| 19 | 20 | 21 | 22 | 23 | 24 | 25 | 
| 26 | 27 | 28 | 29 | 30 | 31 | 
													Tags
													
											
												
												- JSON
- 컨테이너
- 핑거스타일
- Linux
- error
- pandas
- Visual Studio
- 기타 연주
- mysql
- Python
- YOLO
- Numpy
- OpenCV
- SSH
- pytorch
- 채보
- C
- 오류
- paramiko
- windows forms
- ubuntu
- nvidia-smi
- Docker
- label
- pip
- VS Code
- Selenium
- C++
- C#
- 프로그래머스
													Archives
													
											
												
												- Today
- Total
목록exec_command (1)
기계는 거짓말하지 않는다
			
			
				Python Paramiko module SSH exec_command 블록(wait)
				
	
	
               
           
					
					
					
					
					
					
						
					
				Python의 Paramiko module로 SSH 연결 후 원격 명령어가 끝날 때까지 blocking 하는 방법의 예이다. import paramiko import time cli = paramiko.client.SSHClient() cli.set_missing_host_key_policy(paramiko.client.AutoAddPolicy()) cli.connect(hostname="1.1.1.1", username="ubuntu") stdin, stdout, stderr = cli.exec_command("sleep 3") # waiting for command stdout.channel.recv_exit_status() lines = stdout_.readlines() print(''.join(..
				Python
				
				2023. 7. 8. 16:17