diff --git a/perl-xCAT/xCAT/PPCcfg.pm b/perl-xCAT/xCAT/PPCcfg.pm index 0c4e79a27..4ee4c1f15 100644 --- a/perl-xCAT/xCAT/PPCcfg.pm +++ b/perl-xCAT/xCAT/PPCcfg.pm @@ -445,6 +445,7 @@ sub sshcfg { # Determine if SSH is enabled ##################################### if ( !defined( $mode )) { + my ($keytype, $key_string) = split /\ /, $sshkey; xCAT::MsgUtils->verbose_message($request, "rspconfig :check sshcfg for user:$logon on node:$server."); my $result = xCAT::PPCcli::send_cmd( $exp, "cat $auth" ); my $Rc = shift(@$result); @@ -459,7 +460,8 @@ sub sshcfg { # Find logon in key file ################################# foreach ( @$result ) { - if ( /$logon$/ ) { + my ($tmp1, $tmp2) = split /\ /, $_; + if ( "$tmp2" eq "$key_string" ) { return( [[$server,"enabled",SUCCESS]] ); } }