my $cmd = "cat >> /home/vmsys/.ssh/authorized_keys"; my ($stdin, $stdout,$stderr,$pid) = $ssh->open_ex("$cmd"); print { $stdin } $mypubcert;