-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79e92c1
commit f8e9ba5
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,10 +14,12 @@ jobs: | |
options: --privileged | ||
|
||
steps: | ||
- name: Install SSH client | ||
- name: SSH into server | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }} | ||
run: | | ||
apt-get update | ||
apt-get install -y openssh-client | ||
- name: Run SSH command | ||
run: | | ||
ssh -i ${{ secrets.SSH_KEY }} [email protected] "echo test" | ||
mkdir -p ~/.ssh | ||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh -o StrictHostKeyChecking=no -p [email protected] "echo 'SSH connection established!'" |