Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tunnels (easy SSH, SCP & SFTP)
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
test.sh
tunnels

README.md

tunnels (easy SSH, SCP & SFTP)

Author: Mark Carver <mark.carver@me.com>
Created: 2011-09-14
Updated: 2011-09-16
Version: 1.1
Copyright (c) 2011 Beyond Eden Development, LLC. All rights reserved.

About

The purpose of tunnels came about to foster easier SSH commands and SCP & SFTP file transfers with a single connection. Have you ever had to do multiple SCP file transfers in a script and get frustrated when it asks for a password each time? Granted, SSK keys are amazing and this script handles them just fine. But for those who appreciate security and want to be prompted for a password only once upon the initial connection, this script is for you!


Usage

tunnels can be used for many different things, choose what's right for you:

Personal
  1. Download tunnels.dmg from download packages above
  2. Open tunnels.dmg
  3. Install tunnels.pkg
  4. Open Terminal /Applications/Utilities/Terminal.app
  5. Type tunnels. You should see tunnels built in help.
Deployment

If you have a script that requires tunnels support, you can include the following bash snippet:

#!/bin/bash
TUNNELS_SOURCE="/usr/local/bin/tunnels";
if [ ! -f "${TUNNELS_SOURCE}" ]; then
  TUNNELS_SOURCE="/tmp/tunnels_source";
  if [ ! -f "${TUNNELS_SOURCE}" ]; then
    # tunnels not found, download from GitHub
    curl -sL https://raw.github.com/markcarver/tunnels/master/tunnels > "${TUNNELS_SOURCE}"
    chmod +rx "${TUNNELS_SOURCE}";
  fi
  tunnels(){ ${TUNNELS_SOURCE} ${@}; };
fi

tunnels status
Something went wrong with that request. Please try again.