Skip to content

Instantly share code, notes, and snippets.

scp -r -i /path/to/local/key/file.pem user@hostname:~/path/to/remote/file.ext /path/to/local/copy.ext
@MnMTech
MnMTech / Create an SSH tunnel using a key file
Created May 27, 2015 18:52
Create an SSH tunnel using a key file
ssh -N -L 8888:127.0.0.1:80 -i /path/to/local/key/file.pem user@hostname
@MnMTech
MnMTech / Connect to server over SSH using a key file
Last active August 29, 2015 14:22
Connect to server over SSH using a key file
ssh -i /path/to/local/key/file.pem ubuntu@hostname
@MnMTech
MnMTech / Switch to root user.sh
Last active August 29, 2015 14:22
Switch to root user
sudo -s
@MnMTech
MnMTech / Refresh your package index.sh
Last active August 29, 2015 14:22
Refresh your package index
apt-get update
@MnMTech
MnMTech / Install LAMP stack.sh
Last active August 29, 2015 14:22
Install LAMP stack
apt-get install lamp-server^
@MnMTech
MnMTech / Enable Mod Rewrite.sh
Last active August 29, 2015 14:22
Enable Mod Rewrite
a2enmod rewrite
@MnMTech
MnMTech / Restart Apache.sh
Last active August 29, 2015 14:22
Restart Apache
service apache2 restart
@MnMTech
MnMTech / Nano apach2.conf.sh
Last active August 29, 2015 14:22
Nano apach2.conf
nano /etc/apache2/apache2.conf
@MnMTech
MnMTech / Create an admin folder in the web root of Ubuntu 14.04.sh
Last active August 29, 2015 14:22
Create an admin folder in the web root of Ubuntu 14.04
mkdir /var/www/html/admin
cd /var/www/html/admin