Created
July 3, 2016 02:25
-
-
Save aviddiviner/a925e314b107920947dcd5795d21ae74 to your computer and use it in GitHub Desktop.
EC2 user-data script to run SSH on port 443 on startup
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
#!/bin/bash -ex | |
perl -pi -e 's/^#?Port 22$/Port 443/' /etc/ssh/sshd_config | |
service sshd restart || service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment