Need some help. Trying to use Net::openSSH but running into an error and cant seem to find a solution googling or looking at the docs. I'm able to succesfully log into a jump server with this code but not continue on to the next host. I get the following error. Pseudo-terminal will not be allocated because stdin is not a terminal. I guess my problem is telling Net::openSSh how to act like a terminal. I tried connecting with tty => 1 in the options but that produced the same results for me.
#!/usr/bin/perl -w use strict; use Net::OpenSSH; my $host = 'myhost.com'; my $user = 'myusername'; my $passwd = 'mypassword'; my $ssh = Net::OpenSSH->new($host, user => $user, passwd => $passw +d); $ssh->error and die "Can't ssh to $host: " . $ssh->error; #my @ls = $ssh->capture("ssh myusername\@192.168.1.50"); #$ssh->error and # die "remote ls command failed: " . $ssh->error;
In reply to Net::OpenSSH tty error by tcampion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |