App::Goto - Utility for accessing remote servers via SSH
use App::Goto; my $goto = App::Goto->({ config => $config, args => $args }); system( $goto->cmd );
Via included 'g2' script, allows for shortening of commands for connecting to remote servers. Examples of the type of command that can be shortened by using g2 are:
g2 l log => ssh 127.0.0.1 -t 'cd /var/log/ && bash' g2 f top => ssh firstserver -t 'htop'
See g2's own documentation for further details.
App::Goto is designed to make it as easy as possible to access remote servers via SSH, allowing you to give the shortest possible unique string needed to identify the server, and optionally to specify what command to run upon login - such as changing to a frequently-used directory for you.
Requires a hashref of config details that define hosts & commands; and an arrayref of arguments to define the specific host & command to use.
Boolean, returns true if the passed-in arguments were correctly parsed. Otherwise false.
If is_success is false, this should give a useful reason why.
Returns the command string calculated based on the passed-in args & config
Returns the calculated nickname from the possibly-ambiguous supplied argument.
Returns the actual hostname for the supplied nickname.
Dominic Humphries <dominic@oneandoneis2.com>
Copyright 2013- Dominic Humphries
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install App::Goto, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Goto
CPAN shell
perl -MCPAN -e shell install App::Goto
For more information on module installation, please visit the detailed CPAN module installation guide.