autossh-init - AutoSSH init script
Permalink
Failed to load latest commit information.
.gitignore init Apr 8, 2013
README.md add fingerprint check to README Nov 9, 2013
autossh.default ... Apr 9, 2013
autossh.init authorized_keys; _opts; tunnel; VERBOSE Apr 9, 2013

README.md

File        : README.md
Maintainer  : Felix C. Stegerman <flx@obfusk.net>
Date        : 2013-11-09

Copyright   : Copyright (C) 2013  Felix C. Stegerman
Version     : 0.0.1

Description

autossh-init - AutoSSH init script

Usage

local & remote:

$ adduser --system --group --shell /bin/false \
  --home /var/lib/autossh --disabled-password autossh

local:

autossh$ ssh-keygen
# <<PUBKEY>> below is the contents of ~/.ssh/id_rsa.pub here

remote:

autossh$ vim ~/.ssh/authorized_keys
# on a single line, add:
#   command="/bin/false",no-agent-forwarding,no-pty,
#   no-X11-forwarding,permitopen="host1:port1",
#   permitopen="host2:port2" <<PUBKEY>>

local:

$ cp -i autossh.init /etc/init.d/autossh
$ update-rc.d autossh defaults

$ cp -i autossh.default /etc/default/autossh
$ vim /etc/default/autossh

autossh$ ssh autossh@remote FAIL  # confirm fingerprint
# alternatively -- and less securely! -- you can disable
# StrictHostKeyChecking in the autossh_opts

$ service autossh start

TODO

  • improve output?
  • tests?

License

GPLv2 [1].

References

[1] GNU General Public License, version 2 --- http://www.opensource.org/licenses/GPL-2.0