channel_post_mux_listener getpeereid failed: Operation not supported Use of uninitialized value $_[0] in join or string at /usr/share/perl5/Net/OpenSSH.pm line 122. Can't ssh to rocky: unable to establish master SSH connection: at Junk/snaggle.pl line 17. #### #!/usr/bin/perl use strict; use warnings; use Net::OpenSSH; use constant { HOST => q{rocky}, USER => q{rocky}, KEYPATH => q{~/.ssh/broadey.net_rsa}, CMD => q{whoami}, }; #my $ssh = Net::OpenSSH->new(HOST); my $ssh = Net::OpenSSH->new(HOST, user=>USER, key_path=>KEYPATH); $ssh->error and die "Can't ssh to ${\HOST}: " . $ssh->error; my ($out,$pid) = $ssh->pipe_out(CMD) or die "Remote command failed: " . $ssh->error; local $| = 1; # enable output autoflush while (<$out>) { print time, ": ", $_; # $_ includes the \n }