Make and run
apt-get source openssh-server
apt-get install libssl-dev
cd openssh-6.6p1
# Apply patch
patch -p1 openssh/openssh-6.6p1/auth2-pubkey.c < auth2-pubkey.c.patch| # Copyright (c) 2018 Bao Nguyen <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all |
Make and run
apt-get source openssh-server
apt-get install libssl-dev
cd openssh-6.6p1
# Apply patch
patch -p1 openssh/openssh-6.6p1/auth2-pubkey.c < auth2-pubkey.c.patch| # Borrowed from: | |
| # https://github.com/silven/go-example/blob/master/Makefile | |
| # https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
| BINARY = superdo | |
| VET_REPORT = vet.report | |
| TEST_REPORT = tests.xml | |
| GOARCH = amd64 | |
| VERSION?=? |
| def update(dl_url, force_update=False): | |
| """ | |
| Attempts to download the update url in order to find if an update is needed. | |
| If an update is needed, the current script is backed up and the update is | |
| saved in its place. | |
| """ | |
| import urllib | |
| import re | |
| from subprocess import call | |
| def compare_versions(vA, vB): |
| #!/usr/bin/env python | |
| """A module which provides spinners for indicating that a process is running. | |
| These are most useful when you want to provide user feedback that something | |
| is happening but you can't provide a good progress bar. | |
| Known limitations: | |
| If your prompt is longer than the width of your terminal it will wrap, causing | |
| the animation to not work properly. In most cases this probably isn't a big | |
| deal. |
| import shlex | |
| import subprocess | |
| import sys | |
| def run_cmd(cmd, callback=None, watch=False): | |
| """Runs the given command and gathers the output. | |
| If a callback is provided, then the output is sent to it, otherwise it | |
| is just returned. |
| packer build packer.json 2>&1 | sudo tee output.txt | |
| tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt |
| require 'openssl' | |
| def gen_key(name) | |
| key = OpenSSL::PKey::RSA.new 1048 | |
| file = File.new(name, "w") | |
| file.write(key) | |
| file.close | |
| end | |
| def get_key(name) |