File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,24 @@ jobs:
6565 username : ${{ github.repository_owner }}
6666 password : ${{ secrets.GHCR_TOKEN }}
6767
68- - name : Set up SSH key
68+ - name : Set up SSH
6969 run : |
7070 mkdir -p ~/.ssh
7171 echo "${{ secrets.LIGHTSAIL_SSH_KEY }}" > ~/.ssh/lightsail_key
7272 chmod 600 ~/.ssh/lightsail_key
73+
7374 ssh-keygen -R "${{ vars.LIGHTSAIL_HOST }}" || true
7475 ssh-keyscan -H "${{ vars.LIGHTSAIL_HOST }}" >> ~/.ssh/known_hosts
7576
77+ cat > ~/.ssh/config <<EOF
78+ Host ${{ vars.LIGHTSAIL_HOST }}
79+ User ubuntu
80+ IdentityFile ~/.ssh/lightsail_key
81+ IdentitiesOnly yes
82+ StrictHostKeyChecking yes
83+ EOF
84+ chmod 600 ~/.ssh/config
85+
7686 - name : Start ssh-agent
7787 run : |
7888 eval "$(ssh-agent -s)"
Original file line number Diff line number Diff line change 2929ssh :
3030 user : ubuntu
3131 keys_only : true
32- config : false
32+ config : true
You can’t perform that action at this time.
0 commit comments