I am trying to avoid using Net::SSH::Perl library since there is some problems in installing the module using CPAN. Manual install seems too troublesome when I see that it depends on a long list of other Perl modules.
What I am trying to achieve is to log into the SSH with my username and password. Then I will need to run some commands in it and retrieve some files from the server using SSH.
I know how to pass the username, hostname and command using "ssh($username."@".$ip, $command) or die "SSH fails!";". However, I keep getting this error message:
ssh: connect to host XX.XX.XX.XXX port 22: Connection refused
where XX.XX.XX.XXX is the hostname or IP address of my computer and is in the subnet as the server that I am trying to get files from.
Does anyone knows how I can pass in the password to SSH or introduce me to good tutorials on Net::SSH? Most of the tutorials I found online are on Net::SSH::Perl and not for Net::SSH.
libnet-ssh-perlandlibnet-ssh2-perlare both available in UNIVERSE.