misterperl has asked for the wisdom of the Perl Monks concerning the following question:
Now I want to add Foreign, and transmit between them without a password. I'm currently trying:
after this step, $ftph is undef, and $! = 'Inappropriate ioctl for device'. And of course $ftph->error is undef as well.my $ftph; eval { $ftph = Net::SFTP::Foreign( "$user\@$host", more=>'-v', autodie=>0 ); };
If I try sftp user@host at the commandline, the SFTP connection is made successfully with no password, and it drops to the SFTP> prompt.
All of the examples I can find using ::Foreign , as well as the metacpan page, pretty much just start with this same expression, more or less. But I wonder, am I suppposed to establish an SSH pipe first with Perl BEFORE this step, but the examples don't show that step? I did see some examples that had use IO::Pty; , but there was no further calls to that class before the Net::SFTP::Foreign line.
Without the eval {} , the step dies with no message at all.
I also added $Net::SFTP::Foreign::debug = -1; but it didn't seem to produce any additional output.
Advice, tips, and guidance are most appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: trying to get Net::SFTP::Foreign to work
by kcott (Archbishop) on Apr 27, 2023 at 17:13 UTC | |
|
Re: trying to get Net::SFTP::Foreign to work
by choroba (Cardinal) on Apr 27, 2023 at 16:53 UTC | |
|
Re: trying to get Net::SFTP::Foreign to work
by salva (Canon) on Apr 30, 2023 at 12:22 UTC |