-=item ssh
-
-=cut
-
-#false laziness with FS::svc_acct::ssh
-sub ssh {
- my ( $host, @cmd_and_args ) = @_;
-
- use IO::File;
- my $reader = IO::File->new();
- my $writer = IO::File->new();
- my $error = IO::File->new();
-
- &Net::SSH::sshopen3( $host, $reader, $writer, $error, @cmd_and_args) or die $!;
-
- local $/ = undef;
- my $output_stream = <$writer>;
- my $error_stream = <$error>;
- if ( length $error_stream ) {
- #warn "[FS::svc_acct::ssh] STDERR $error_stream";
- die "[FS::svc_domain::ssh] STDERR $error_stream";
- }
- if ( length $output_stream ) {
- warn "[FS::svc_domain::ssh] STDOUT $output_stream";
- }
-
-# &Net::SSH::ssh(@args,">>/usr/local/etc/freeside/sshoutput 2>&1");
-}
-
-