From 24714471d543cb731e3ddcf80d5c75033c4987fd Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Thu, 24 Oct 2024 23:47:43 -0700 Subject: [PATCH] #16 Run ssh more explicitly --- .gitea/workflows/vyos-deploy.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/vyos-deploy.yaml b/.gitea/workflows/vyos-deploy.yaml index bdd17507..edd9ff36 100644 --- a/.gitea/workflows/vyos-deploy.yaml +++ b/.gitea/workflows/vyos-deploy.yaml @@ -19,16 +19,15 @@ jobs: - name: Configure SSH run: | echo -e "${{ secrets.RUNNER_SSH_PRIVATEKEY }}" > /tmp/key - chmod 0600 /tmp/key + chmod 600 /tmp/key ssh-keygen -y -f /tmp/key > /tmp/key.pub ssh-keygen -l -E sha256 -f /tmp/key.pub mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts ssh-keyscan 192.168.1.1 > ~/.ssh/known_hosts chmod 0600 ~/.ssh/known_hosts - - name: Print running VyOS version + - name: Connect to VyOS run: | - whoami - ./vyos.sh op show system image + ssh -i /tmp/key vyos@192.168.1.1 # - name: SSH into host # uses: appleboy/ssh-action@v1.1.0