Download Latest WordPress

Quick bash script for downloading latest WordPress on a server via ssh.

wget http://wordpress.org/latest.tar.gz && tar xfz latest.tar.gz && rm -rf wordpress/wp-content/ && mv wordpress/* ./ && rm -rf wordpress/ && rm -rf latest.tar.gz

SSH – No password

Get your SSH public key – with from IP prepended – ready to add to the authorized_keys file of a server you want to log into without a password.

IP=$(curl -Sfs https://wtfismyip.com/text) && KEY=$(cat ~/.ssh/id_rsa.pub) && echo 'from="'$IP'"' $KEY

Go one step further and add it to the server automatically:

IP=$(curl -Sfs https://wtfismyip.com/text) && KEY=$(cat ~/.ssh/id_rsa.pub) && echo 'from="'$IP'"' $KEY | ssh [email protected] 'cat >> ~/.ssh/authorized_keys'