fix(deploy): SSH 디버그 + printf 키 저장 (#48)
Some checks failed
Deploy KCG / deploy (push) Failing after 1m12s
Some checks failed
Deploy KCG / deploy (push) Failing after 1m12s
Co-authored-by: htlee <htlee@gcsc.co.kr> Co-committed-by: htlee <htlee@gcsc.co.kr>
This commit is contained in:
부모
6182a79ae4
커밋
7b05598714
@ -88,11 +88,14 @@ jobs:
|
||||
DEPLOY_HOST: 192.168.1.20
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$DEPLOY_KEY" > ~/.ssh/id_deploy
|
||||
printf '%s\n' "$DEPLOY_KEY" > ~/.ssh/id_deploy
|
||||
chmod 600 ~/.ssh/id_deploy
|
||||
ssh-keyscan $DEPLOY_HOST >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||
ssh-keyscan -T 5 $DEPLOY_HOST >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||
|
||||
SSH_CMD="ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no root@$DEPLOY_HOST"
|
||||
echo "=== SSH debug: key=$(wc -c < ~/.ssh/id_deploy) bytes, host=$DEPLOY_HOST ==="
|
||||
ssh -v -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@$DEPLOY_HOST 'echo SSH_OK' 2>&1 | grep -E 'Authenticated|Permission|connect|SSH_OK|exit' || true
|
||||
|
||||
SSH_CMD="ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no -o ConnectTimeout=10 root@$DEPLOY_HOST"
|
||||
|
||||
$SSH_CMD bash -s << 'RESTART'
|
||||
set -e
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user