Download Latest WordPress

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

wget && 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 && KEY=$(cat ~/.ssh/ && echo 'from="'$IP'"' $KEY

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

IP=$(curl -Sfs && KEY=$(cat ~/.ssh/ && echo 'from="'$IP'"' $KEY | ssh user@host 'cat >> ~/.ssh/authorized_keys'