--- /usr/lib/perl5/vendor_perl/5.8.5/Net/SSH/Perl/SSH1.pm 2005-10-11 20:57:31.000000000 -0400
+++ SSH1.pm 2007-02-26 15:09:47.000000000 -0500
@@ -27,14 +27,15 @@
sub _proto_init {
my $ssh = shift;
+ my $home = $ENV{HOME} || (getpwuid($>))[7];
unless ($ssh->{config}->get('user_known_hosts')) {
- $ssh->{config}->set('user_known_hosts', "$ENV{HOME}/.ssh/known_hosts");
+ $ssh->{config}->set('user_known_hosts', "$home/.ssh/known_hosts");
}
unless ($ssh->{config}->get('global_known_hosts')) {
$ssh->{config}->set('global_known_hosts', "/etc/ssh_known_hosts");
}
unless (my $if = $ssh->{config}->get('identity_files')) {
- $ssh->{config}->set('identity_files', [ "$ENV{HOME}/.ssh/identity" ]);
+ $ssh->{config}->set('identity_files', [ "$home/.ssh/identity" ]);
}
for my $a (qw( password rhosts rhosts_rsa rsa ch_res )) {