Project

tunneler

0.0
No commit activity in last 3 years
No release in over 3 years
Command line tool and ruby gem for SSH tunneling
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

Tunneler

Tunneler is a Ruby command line interface for multi-hop SSH tunneling.

  • SCP files through a bastion host
  • Execute remote commands through a bastion host
  • SSH through a bastion host using native terminal

Version

0.0.1

Installation

gem install tunneler

Example Command-Line Usage

tunneler --bastion-host 150.1.2.3 --destination-host 151.2.3.4 ssh
tunneler --bastion-host 150.1.2.3 --destination-host 151.2.3.4 scp local_file destination_file
tunneler --bastion-host 150.1.2.3 -d 151.2.3.4 execute 'whoami'

Example Gem Usage

require "tunneler"

# Create SSH tunnel
tunnel = Tunneler::SshTunnel.new(bastion_user, bastion_host, {:keys => [bastion_key]})

# Establish remote connection
destination_host_connection = tunnel.remote(destination_user, destination_host, {:keys => [destination_key]})

# Upload file to destination host via tunnel
destination_host_connection.scp(local_file_path, destination_file_path)

# Execute common on destination host via tunnel
response = destination_host_connection.ssh(command)

License

MIT