This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on: http://www.systutorials.com/5450/improving-sshscp-performance-by-choosing-ciphers/#comment-28725 | |
# | |
# You should set up PublicKey authentication so that you don't have to type your | |
# password for every cipher tested. | |
set -o pipefail | |
ciphers="$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am abalanuta on github. | |
* I am arturbalanuta (https://keybase.io/arturbalanuta) on keybase. | |
* I have a public key ASDEHu1OYsbFR5DV1_3sO7ultS7gNxY0akYnFziH9EoKSAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# From: https://gitlab.com/grownetics/devops/blob/master/tor_ssh.sh | |
# TOR Setup Script | |
# Author: Nick Busey | |
# | |
# This file is meant to get SSH access via Tor to a server in one command. | |
# | |
# Usage (as root): $ bash <(curl -s https://gitlab.com/grownetics/devops/raw/master/tor_ssh.sh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, check out the commit you wish to go back to (get sha-1 from git log) | |
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a | |
# Then do a forced update. | |
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:master | |
# Push specific commit | |
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:master -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to @samsonjs for the cleaned up version: | |
# https://gist.github.com/samsonjs/4076746 | |
PREFIX=$HOME | |
VERSION=1.2.3 | |
# Install Protocol Buffers | |
wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 | |
tar -xf protobuf-2.4.1.tar.bz2 | |
cd protobuf-2.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rock@localhost:~$ openssl speed aes-256-cbc | |
Doing aes-256 cbc for 3s on 16 size blocks: 10955656 aes-256 cbc's in 3.00s | |
Doing aes-256 cbc for 3s on 64 size blocks: 2971918 aes-256 cbc's in 3.00s | |
Doing aes-256 cbc for 3s on 256 size blocks: 752396 aes-256 cbc's in 3.00s | |
Doing aes-256 cbc for 3s on 1024 size blocks: 189230 aes-256 cbc's in 3.00s | |
Doing aes-256 cbc for 3s on 8192 size blocks: 23578 aes-256 cbc's in 3.00s | |
Doing aes-256 cbc for 3s on 16384 size blocks: 11824 aes-256 cbc's in 3.00s | |
OpenSSL 1.1.0g 2 Nov 2017 | |
built on: reproducible build, date unspecified | |
options:bn(64,64) rc4(char) des(int) aes(partial) blowfish(ptr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `ssh -Q cipher`; do dd if=/dev/zero bs=1M count=300 2> /dev/null | ssh -c $i $USER@localhost "(time -p cat) > /dev/null" 2>&1 | grep real | awk '{print "'$i': "300 / $2" MB/s" }'; done | |
# /etc/ssh/ssh_config (or ~/.ssh/config) and sshd_config | |
Ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com | |
#https://turecki.net/content/getting-most-out-ssh-hardware-acceleration-tuning-aes-ni |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ip:port to bind the UDP listener to (default: "0.0.0.0:1700") | |
UDP_BIND=127.0.0.1:1700 | |
# mqtt server (e.g. scheme://host:port where scheme is tcp, ssl or ws) (default: "tcp://127.0.0.1:1883") | |
MQTT_SERVER=tls://openchirp.andrew.cmu.edu:1883 | |
# mqtt prefix | |
MQTT_PREFIX="<your_openchirp_device_endpoint>" | |
# mqtt server username (optional) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Twisted SSL webserver with basic authentication using plain in-memory passwords. | |
The first argument is the path of the directory to serve; if not provided then the current folder is used ("."). | |
INSTALL DEPENDENCIES: | |
pip install twisted | |
pip install pyOpenSSL | |
pip install service_identity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
openssl req -new -x509 -keyout yourpemfile.pem -out yourpemfile.pem -days 3650 -nodes |
NewerOlder