Skip to content

Instantly share code, notes, and snippets.

View ssimpson89's full-sized avatar

Stephen Simpson ssimpson89

View GitHub Profile
@ssimpson89
ssimpson89 / ping.sh
Created June 13, 2014 18:31
Ping Script
for i in $@
do
ping -q -c 1 -W 1 ${1} >/dev/null
if [[ $? == 0 ]]
then
echo $1 OK
else
echo $1 FAILED
fi
shift
@ssimpson89
ssimpson89 / scpsftprsynconly.c
Created January 19, 2016 21:34
Restrict Shell To Rsync SFTP and SCP
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/*
*** Original by Patric Draper <http://www.pdrap.org/about/>
***
*** Changes on 13-Mar-2004 by Msquared <http://www.msquared.id.au/>
***
### Keybase proof
I hereby claim:
* I am ssimpson89 on github.
* I am ssimpson (https://keybase.io/ssimpson) on keybase.
* I have a public key whose fingerprint is 47E6 9D63 5860 3A40 8EB5 4C21 9815 C9BC 120E D3AE
To claim this, I am signing this object: