Help for this page

Select Code to Download


  1. or download this
    #These two just exit after this command
    $result = `ssh-copy-id -i $path_publick_key $user\@$server 2>/dev/null
    + < "$password"`;
    ...
    #This gives a password prompt, without me printing the $result, which 
    +makes me think, that ssh is using some named output device, instead o
    +f stdout.
    #$result is empty:
    $result = `echo "$password"|ssh-copy-id -i $path_publick_key $user\@$s
    +erver 2>/dev/null`;
    
  2. or download this
    use IPC::Cmd qw{run};
    
    ...
        #print has no effect, as the password prompt got already displayed
    + without being captured to the $ssh_cp_id:
        print $ssh_cp_id;
    }