AnyEvent-SSH2
view release on metacpan or search on metacpan
lib/AnyEvent/SSH2.pm view on Meta::CPAN
if (!defined $arg{pass} && exists $CONFIG->{ssh_password}) {
$arg{pass} = $CONFIG->{ssh_password};
}
$ssh->{config}->set('pass', $arg{pass});
#my $suppress_shell = $_[2];
}
sub _current_user {
my $user;
eval { $user = scalar getpwuid $> };
return $user;
}
sub set_protocol {
my $ssh = shift;
my $proto = shift;
$ssh->{use_protocol} = $proto;
$ssh->debug($ssh->version_string);
$ssh->_proto_init;
}
lib/AnyEvent/SSH2.pm view on Meta::CPAN
$VERSION;
$ssh->{client_version_string} = substr $buf, 0, -1;
my $handle = $ssh->{session}{sock};
$handle->push_write($buf);
$ssh->set_protocol($set_proto);
$ssh->_compat_init($remote_version);
}
sub _proto_init {
my $ssh = shift;
my $home = $ENV{HOME} || (getpwuid($>))[7];
unless ($ssh->{config}->get('user_known_hosts')) {
defined $home or croak "Cannot determine home directory, please set the environment variable HOME";
$ssh->{config}->set('user_known_hosts', "$home/.ssh/known_hosts2");
}
unless ($ssh->{config}->get('global_known_hosts')) {
$ssh->{config}->set('global_known_hosts', "/etc/ssh_known_hosts2");
}
unless (my $if = $ssh->{config}->get('identity_files')) {
defined $home or croak "Cannot determine home directory, please set the environment variable HOME";
$ssh->{config}->set('identity_files', [ "$home/.ssh/id_dsa" ]);
( run in 0.257 second using v1.01-cache-2.11-cpan-8d75d55dd25 )