aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 41438562ef0d7a4609fbb8827d315fc358d69654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
This module manages autossh tunnels between hosts.


Prerequisites
=============

* The user has to be able to log in to the remote ssh system automatically,
  ssh-agent and/or authorized_keys can be used to accomplish this

* SSH port forwarding must be enabled on the remote host


Example
=======

autossh::tunnel { 'mysql':
        ensure => present,
        user => 'tunnel',
        port => 3307,
        hostport => 3306,
        remote_host => 'mysql.example.org',
}

This will establish an ssh connection as user 'tunnel', to remote server
'mysql.example.org' with port forwarding enabled. Connections on localhost to
port '3307' with be forwarded through the tunnel to 'localhost', port 3306.

Only connections originating from 'localhost' will be accepted into the tunnel.
If you wish to allow other hosts on the network to use this tunnel, you may
specify an explicit interface to bind the connection to using 'bind_address'.
A value of '*' will bind to all interfaces.

Furthermore, if you wish to use the remote host as a gateway to another host on
the network, you may specify it using the 'host' parameter.


More info
=========

* AutoSSH README : http://www.harding.motd.ca/autossh/README

* SSH manual : http://www.openbsd.org/cgi-bin/man.cgi?query=ssh&sektion=1