App::assh - A wrapper around autossh.
version 1.1.2
A wrapper around autossh.
`autossh` is a nifty little ssh-keepalive-connection-holder.
Passing in the ports for the keepalive can be clumsy though: `assh` helps you to avoid that.
assh assh HOSTNAME
First, you will need a file `~/.ssh/config`. It looks something like this:
Host foo HostName bar.example.com User baz
With this, you can already leverage standard `ssh` connections:
ssh foo
... instead of
ssh baz@bar.example.com
Next, generate a file `~/.autossh_rc` with the following format:
foo 12345
... with the first entry on the line representing your `Host` in `~/.ssh/config` and the second item on the line being the port over which to keep the autossh connection alive.
Now you can permanently connect using:
assh foo
... with the connection kept alive across network switches and computer shutdowns.
hosts: HashRef holding the values HOSTNAME => AUTOSSH_PORT
ports: HashRef holding the values HOSTNAME => USER => USERNAME, HOST => HOSTNAME
USER => USERNAME, HOST => HOSTNAME
ssh_config_file: The path to the ssh config file. Default: `~/.ssh/config`
ports_config_file: The path to the ports config (this is what I have chosen): `~/.autossh_rc`
autossh: <http://www.harding.motd.ca/autossh/>
DBR <dbr@cpan.org>
This software is Copyright (c) 2013 by DBR.
This is free software, licensed under:
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
To install App::assh, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::assh
CPAN shell
perl -MCPAN -e shell install App::assh
For more information on module installation, please visit the detailed CPAN module installation guide.