Skip to content

Instantly share code, notes, and snippets.

@oakaigh
Created October 11, 2018 12:27
Show Gist options
  • Save oakaigh/0010d80d9a2c494c0d4068f4a90c62cc to your computer and use it in GitHub Desktop.
Save oakaigh/0010d80d9a2c494c0d4068f4a90c62cc to your computer and use it in GitHub Desktop.
yum install nodejs -y && npm install -g json
@oakaigh
Copy link
Author

oakaigh commented Oct 11, 2018

command -v sshpass >/dev/null 2>&1 || { yum install epel-release sshpass -y > /dev/null; }
command -v sshfs >/dev/null 2>&1 || { yum install sshfs -y > /dev/null; }
command -v npm >/dev/null 2>&1 || { yum install nodejs -y > /dev/null; npm --silent install -g json; }
sudo mkdir /mnt/ubuntu_logs
sshfs -o IdentityFile=/path/to/key user@ubuntu:/var/log /mnt/ubuntu_logs 
sudo umount /mnt/ubuntu_logs 
< /dev/urandom tr -dc A-Za-z0-9 | head -c32; echo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment