Created
December 11, 2025 16:16
-
-
Save ksingh-scogo/a232397e6af96ae1a5d29ee51593343e to your computer and use it in GitHub Desktop.
setup2.sh
This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak.$(date +%s) | |
| sed -i 's/^#\?Port .*/Port 9235/' /etc/ssh/sshd_config | |
| grep -q '^Port 9235' /etc/ssh/sshd_config || echo 'Port 9235' >> /etc/ssh/sshd_config | |
| systemctl restart sshd || systemctl restart ssh | |
| echo "done !!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment