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 für die Klasse Net::SSH::Perl, die das SSH Netzprotokoll direkt spricht.
Sollte es bei der Installation von Net::SSH::Perl in Crypt::Curve25519 zu dem Fehler kommen
curve25519-donna-c64.c:99:1: error: conflicting types for ‘fmul’ fmul(felem output, const felem in2, const felem in) { ^~~~ In file included from /home/fs2/sys/opt/perlbrew/perls/perl-5.30.0/lib/5.30.0/x86_64-linux/CORE/perl.h:2068, from Curve25519.xs:3: /usr/include/x86_64-linux-gnu/bits/mathcalls-narrow.h:30:20: note: previous declaration of ‘fmul’ was here __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2); ^~~~~~~~~~~~~~~
kann dieser mit
$ grep -rl "fmul" ./ | xargs sed -i 's/fmul/fixedvar/g'
behoben werden. Siehe: https://github.com/ajgb/crypt-curve25519/issues/9#issuecomment-447845725
Zeige den 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.
(String) Ausgabe des Kommandos auf stdout. Wenn keine Ausgabe, Leerstring.
(String) Ausgabe des Kommandos auf stderr. Wenn keine Ausgabe, Leerstring.
(Integer) Exitcode des Kommandos. Wird gesetzt, wenn -sloppy=>1 ist, sonst konstant 0.
-sloppy=>1
1.207
Frank Seitz, http://fseitz.de/
Copyright (C) 2023 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.