in reply to Re: Calling a remote ssh connection from perl
in thread Calling a remote ssh connection from perl

Yes, I forgot to escape from things. So I modified the command
system("ssh root\@remoteIP /usr/bin/ls");

and that seems to connect to the remote server but now it prompts for the password. And when I enter the password, I get a Permission Denied error.

Replies are listed 'Best First'.
Re^3: Calling a remote ssh connection from perl
by LanX (Saint) on May 27, 2021 at 22:48 UTC
    see haukex' suggestion to use Net::OpenSSH, I second this.

    And you've changed the original post I replied to, this makes reading and understanding the thread very hard for others.

    (it was system("ssh root@remoteIP /usr/bin/ls"); )

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery