###Single hop tunelling:
ssh -f -N -L 9906:127.0.0.1:3306 [email protected]
where,
-fputs ssh in background-Nmakes it not execute a remote command
| # Install latest su-exec | |
| RUN set -ex; \ | |
| \ | |
| curl -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c; \ | |
| \ | |
| fetch_deps='gcc libc-dev'; \ | |
| apt-get update; \ | |
| apt-get install -y --no-install-recommends $fetch_deps; \ | |
| rm -rf /var/lib/apt/lists/*; \ | |
| gcc -Wall \ |
| [Unit] | |
| Description=Docker Application Container Engine | |
| Documentation=http://docs.docker.com | |
| After=network.target docker.socket | |
| Wants=docker.socket | |
| [Service] | |
| Type=notify | |
| Environment=GOTRACEBACK=crash |
| # Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
| # GitLab uses docker in the background, so we need to specify the | |
| # image versions. This is useful because we're freely to use | |
| # multiple node versions to work with it. They come from the docker | |
| # repo. | |
| # Uses NodeJS V 9.4.0 | |
| image: node:9.4.0 | |
| # And to cache them as well. |
| #!/bin/bash | |
| # scp-speed-test.sh | |
| # | |
| # Usage: | |
| # ./scp-speed-test.sh user@hostname [test file size in MBs] | |
| # | |
| ############################################################# | |
| ssh_server=$1 | |
| test_file=".scp-test-file" |
| #!/bin/bash | |
| # | |
| # Usage: | |
| # ./make_certs.sh test.example.com | |
| # | |
| # The required input to make_certs.sh is the path to your pfx file without the .pfx prefix | |
| # | |
| # test.example.com.key | |
| # test.example.com.crt (includes ca-certs) |
| # source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
| yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
| mkdir ~/ffmpeg_sources | |
| cd ~/ffmpeg_sources | |
| curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
| tar xzvf yasm-1.2.0.tar.gz | |
| cd yasm-1.2.0 |
| #enable each service for boot | |
| systemctl enable nodemanager | |
| systemctl enable adminserver | |
| #then reboot and test |
| rpm --import ftp://ftp.inf.utfsm.cl/pub/Linux/CentOS/7/os/x86_64/RPM-GPG-KEY-CentOS-7 | |
| yum install -y python-simplejson m2crypto mod_wsgi openscap wget | |
| wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.el6.x86_64.rpm | |
| wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.el6.noarch.rpm | |
| wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.el6.x86_64.rpm | |
| wget http://dev.centos.org/centos/6/upg/x86_64/Packages/python-rhsm-1.9.7-1.el6.x86_64.rpm | |
| wget http://dev.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-1.el6.noarch.rpm |
| #!/bin/bash | |
| MONGO_DATABASE="your_db_name" | |
| APP_NAME="your_app_name" | |
| MONGO_HOST="127.0.0.1" | |
| MONGO_PORT="27017" | |
| TIMESTAMP=`date +%F-%H%M` | |
| MONGODUMP_PATH="/usr/bin/mongodump" | |
| BACKUPS_DIR="/home/username/backups/$APP_NAME" |
###Single hop tunelling:
ssh -f -N -L 9906:127.0.0.1:3306 [email protected]
where,
-f puts ssh in background-N makes it not execute a remote command