Skip to content

Instantly share code, notes, and snippets.

@venj
Last active December 19, 2015 04:39
Show Gist options
  • Save venj/5898624 to your computer and use it in GitHub Desktop.
Save venj/5898624 to your computer and use it in GitHub Desktop.
Another version of obf-ssh startup script for debian. via: http://blog.slpo.net/?p=1234
#! /bin/sh
### BEGIN INIT INFO
# Provides: sshd_ofc
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: OpenBSD Secure Shell server (ofc)
### END INIT INFO
case "$1" in
start)
/usr/sbin/sshd_ofc -f /etc/ssh/sshd_ofc_config
;;
stop)
killall /usr/sbin/sshd_ofc
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 start|stop|restart"
exit 1
esac
exit 0
#chmod +x /etc/init.d/ssh_ofc
#insserv -v -d /etc/init.d/ssh_ofc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment