Skip to content

Instantly share code, notes, and snippets.

View james-ni's full-sized avatar

James Ni james-ni

  • Melbourne, Australia
View GitHub Profile
@james-ni
james-ni / ssh_jumpbox.sh
Created December 14, 2019 11:51
Connect to a private server through SSH jump box
ssh -fN -L 8888:10.1.2.151:80 [email protected] -i PRIVATEKEY.pem
curl -i localhost:8888
@james-ni
james-ni / ec2bootstrap.sh
Last active January 2, 2020 11:14
EC2 Bootstrap script
#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
chkconfig httpd on
cd /var/www/html
echo "<html><h1>Hello! Welcome To My Webpage @ $HOSTNAME</h1></html>" > index.html