Net-LibSSH

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

GETPROTOENT_R_PROTO|5.008000|5.008000|Vn
getpwent|5.009000||Viu
GETPWENT_R_HAS_BUFFER|5.008000||Viu
GETPWENT_R_HAS_FPTR|5.008000||Viu
GETPWENT_R_HAS_PTR|5.008000||Viu
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
get_regclass_nonbitmap_data|5.031011||Viu
get_regex_charset_name|5.031004||Vniu
getservbyname|5.005000||Viu
GETSERVBYNAME_R_HAS_BUFFER|5.008000||Viu
GETSERVBYNAME_R_HAS_PTR|5.008000||Viu

ppport.h  view on Meta::CPAN

KEY_getnetent|5.003007||Viu
KEY_getpeername|5.003007||Viu
KEY_getpgrp|5.003007||Viu
KEY_getppid|5.003007||Viu
KEY_getpriority|5.003007||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
KEY_getspnam|5.031011||Viu
KEY_given|5.009003||Viu
KEY_glob|5.003007||Viu
KEY_gmtime|5.003007||Viu
KEY_goto|5.003007||Viu

t/02-integration.t  view on Meta::CPAN

my $srv = TestSSHD->start;
unless ($srv) {
    plan skip_all => 'sshd or ssh-keygen not available';
}

# --- connect + auth ---

my $ssh = Net::LibSSH->new;
$ssh->option(host    => $srv->host);
$ssh->option(port    => $srv->port);
$ssh->option(user    => scalar getpwuid($<));
$ssh->option(knownhosts => '/dev/null');

ok $ssh->connect, 'connect() succeeds'
    or diag 'connect error: ' . ($ssh->error // '');

ok $ssh->auth_publickey($srv->client_key), 'auth_publickey() succeeds'
    or diag 'auth error: ' . ($ssh->error // '');

# --- channel + exec ---

t/lib/TestSSHD.pm  view on Meta::CPAN

        or return undef;

    system('ssh-keygen', '-t', 'ed25519', '-N', '', '-f', "$dir/client_key", '-q') == 0
        or return undef;

    system('cp', "$dir/client_key.pub", "$dir/authorized_keys") == 0
        or return undef;
    chmod 0600, "$dir/authorized_keys";

    my $port = _free_port() or return undef;
    my $user = getpwuid($<);

    my $cfg = "$dir/sshd_config";
    open my $fh, '>', $cfg or return undef;
    print $fh <<"CONFIG";
Port $port
HostKey $dir/host_key
AuthorizedKeysFile $dir/authorized_keys
PidFile $dir/sshd.pid
LogLevel ERROR
StrictModes no



( run in 1.685 second using v1.01-cache-2.11-cpan-e1769b4cff6 )