Skip to content

Commit

Permalink
better ssh config
Browse files Browse the repository at this point in the history
  • Loading branch information
clincha committed Oct 19, 2024
1 parent 3dad6e9 commit a9fed45
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy_vagrant_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ jobs:
run: |
sudo useradd -m clincha
sudo mkdir /home/clincha/.ssh
sudo echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICCmbdbyomjGRMd2Jkkgyy3NulpT20mSDGC4ngEw18Ht clincha" > /home/clincha/.ssh/authorized_keys
sudo chown clincha:clincha /home/clincha/.ssh/authorized_keys
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICCmbdbyomjGRMd2Jkkgyy3NulpT20mSDGC4ngEw18Ht clincha" | sudo tee /home/clincha/.ssh/authorized_keys
sudo chown -R clincha:clincha /home/clincha/.ssh
sudo chmod 700 /home/clincha/.ssh
sudo chmod 600 /home/clincha/.ssh/authorized_keys
sudo echo "clincha ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/clincha
sudo echo "AllowUsers clincha" | sudo tee -a /etc/ssh/sshd_config
echo "clincha ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/clincha
echo "AllowUsers clincha" | sudo tee -a /etc/ssh/sshd_config
sudo systemctl restart sshd
- name: "Establish WireGuard connection"
run: |
Expand Down

0 comments on commit a9fed45

Please sign in to comment.