Quiq::Ssh - Führe Kommando per SSH aus
Quiq::Hash
Ein Objekt der Klasse repräsentiert eine SSH-Verbindung zu einem Host. Über die Verbindung können Shell-Kommandos ausgeführt werden. Die Klasse ist ein Wrapper fr die Klasse Net::SSH::Perl, die das SSH Netzprotokoll direkt spricht.
Zeige Inhalt des Homeverzeichnisses auf Host dssp an:
$ perl -MQuiq::Ssh -E 'print Quiq::Ssh->new("dssp")->exec("ls")'
$ssh = $class->new($host,@opt);
Hostname
Schreibe Debug-Information über die SSH-Kommunikation nach STDERR.
Default für Methode exec(): Führe Kommandos per Login-Shell aus.
Name des Benutzers.
Objekt
Instantiiere ein Objekt für die Ausführung von Kommandos via SSH auf Host $host über den Benutzer $user.
($stdout,$stderr) = $ssh->exec($cmd,@opt); ($stdout,$stderr,$exit) = $ssh->exec($cmd,-sloppy=>1,@opt);
Kommandozeile
Führe das Remote-Kommando unter einer Login-Shell aus. Als Shell wird die bash verwendet.
Wirf keine Exception, wenn das Remote-Kommando fehlschlägt, sondern liefere den Exitcode als dritten Returnwert zurück.
Ausgabe des Kommandos auf stdout (String).
Ausgabe des Kommandos auf stderr (String).
Exitcode des Kommandos (Integer). Wird gesetzt, wenn -sloppy=>1 ist, sonst konstant 0.
1.145
Frank Seitz, http://fseitz.de/
Copyright (C) 2019 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.