18 lines
998 B
Python
18 lines
998 B
Python
import paramiko, sys
|
|
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
|
|
c = paramiko.SSHClient(); c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect('101.79.17.164', username='root', password='1q2w3e!Q', timeout=15)
|
|
def run(label, cmd, timeout=15):
|
|
_, o, _ = c.exec_command(cmd, timeout=timeout)
|
|
print(f'\n[{label}]\n' + o.read().decode('utf-8','replace').strip()[:400])
|
|
|
|
run('www GuardiaDetail 파일',
|
|
'ls -lh /var/www/zioinfo/assets/GuardiaDetail*.js | sort -k6,7')
|
|
run('www index.html 날짜',
|
|
'stat /var/www/zioinfo/index.html | grep Modify')
|
|
run('backend static GuardiaDetail',
|
|
'ls -lh /opt/zioinfo/src/backend/src/main/resources/static/assets/GuardiaDetail*.js')
|
|
run('서비스 상태', 'systemctl is-active zioinfo')
|
|
run('API 응답', 'curl -sf -o /dev/null -w "HTTP %{http_code}" https://localhost:8443/solution/guardia -k 2>/dev/null || curl -sf -o /dev/null -w "HTTP %{http_code}" http://localhost:8082/solution/guardia 2>/dev/null')
|
|
c.close()
|