Add SSH connection test step in deploy workflow #14
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rdenadai/web.redecapivara.social!14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rdenadai-patch-4"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added a step to test the SSH connection before deployment.
Pull Request Overview
This PR adds an SSH connection test step to the deployment workflow to verify connectivity before attempting the actual deployment. This helps catch connection issues early and provides better debugging information.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -44,1 +44,4 @@- name: Test SSH connectionrun: |ssh -vvv -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.VM_USER }}@${{ secrets.VM_IP }} "echo 'SSH connection successful'"The triple verbose flag (-vvv) produces excessive debug output that may expose sensitive information in CI logs. Consider using single -v for basic connection verification or remove verbose flags entirely for production workflows.
@ -45,3 +48,4 @@- name: Deploy dist/ to VM:/pdsrun: |rsync -avz --delete -e "ssh -p ${{ secrets.SSH_PORT }} -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" ./dist/ ${{ secrets.VM_USER }}@${{ secrets.VM_IP }}:/pds/web/Using StrictHostKeyChecking=no bypasses host key verification, making the connection vulnerable to man-in-the-middle attacks. Since ssh-keyscan is used in line 43 to add the host key to known_hosts, this option should be removed to use the proper host verification.