Skip to content

Commit 3a82a91

Browse files
committed
Enabled ssh login using password and added post-deploy instructions
1 parent 7357c39 commit 3a82a91

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,27 @@ SSH_PUBLIC_KEY: ssh-rsa AAAAB3NzaC1... john@localhost
5757
### 3. Deploy
5858
The setup will automatically deploy when you push to the main branch, or you can manually trigger it from the Actions tab.
5959

60+
### 4. Post-Setup Security Steps
61+
62+
After the GitHub Action completes successfully:
63+
64+
1. Test SSH key-based login:
65+
```bash
66+
ssh your-user@your-vps-host
67+
```
68+
69+
2. If SSH key access works, disable password authentication:
70+
```bash
71+
ssh your-user@your-vps-host 'sudo sed -i "s/PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config && sudo systemctl restart sshd'
72+
```
73+
74+
⚠️ Important:
75+
- Only disable password authentication after confirming SSH key access works
76+
- Keep a backup of your SSH private key
77+
- Store your VPS root password securely (in case of emergencies)
78+
- Monitor the GitHub Actions logs for the setup result
79+
80+
6081
## 📋 What Gets Installed
6182

6283
- UFW (Uncomplicated Firewall)
@@ -91,25 +112,6 @@ The setup will automatically deploy when you push to the main branch, or you can
91112
- Root login disabled
92113
- Password authentication enabled. For security reasons you should disable it after successfull setup (see [Post-Setup Security Steps](#4-post-setup-security-steps) below)
93114

94-
### 4. Post-Setup Security Steps
95-
96-
After the GitHub Action completes successfully:
97-
98-
1. Test SSH key-based login:
99-
```bash
100-
ssh your-user@your-vps-host
101-
```
102-
103-
2. If SSH key access works, disable password authentication:
104-
```bash
105-
ssh your-user@your-vps-host 'sudo sed -i "s/PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config && sudo systemctl restart sshd'
106-
```
107-
108-
⚠️ Important:
109-
- Only disable password authentication after confirming SSH key access works
110-
- Keep a backup of your SSH private key
111-
- Store your VPS root password securely (in case of emergencies)
112-
- Monitor the GitHub Actions logs for the setup result
113115

114116
## 🛠️ Customization
115117

0 commit comments

Comments
 (0)