Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions VPC-Follow-Along/private.userdata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
su ec2-user
echo -e "randompassword\nrandompassword" | passwd ec2-user
sudo sed -i "/^[^#]*PasswordAuthentication[[:space:]]no/c\PasswordAuthentication yes" /etc/ssh/sshd_config
sudo service sshd restart
16 changes: 16 additions & 0 deletions VPC-Follow-Along/public.userdata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#!/usr/bin/env bash
su ec2-user
sudo yum install httpd -y
sudo su -c "cat > /var/www/html/index.html <<EOL
<html>
<head>
<title>My WebApp</title>
</head>
<body>
<h1>My WebApp</h1>
</body>
</html>
EOL"

sudo service httpd start