in reply to Re^2: getting sftp to work with 2 different platforms and keypairs
in thread getting sftp to work with 2 different platforms and keypairs
Let me first address the topicality. At this point, I'm addressing things that are implementation specific in a couple ways. First is that I am on the windows platform. It's truly one of the bummers of the windows platform that I have to fight to make this happen. Also, I wouldn't want bliako to think that I've lost faith in unix. The truth is that I would install a dual boot ubuntu, but I can't get the darn thing to restart cold and look at the thumb drive. So I have to live in windowsland on my nice new machine for the time being.
Additionally, this question is implementation specific in that it considers Strawberry Perl first. I took soonix's downthread advice and installed Git, and with the way perl is behaving, I'm genuinely confused. For those uninterested in this implementation-specific problem, I invite you to skip the content between the readmore tags (maybe the entire thread if you're tired of posts about getting strawberry perl configured):
I thought I might do an end around with the keypairs-auth problem by writing the sftp routine to work by password instead:
C:\Users\tblaz\Documents\evelyn\tja\1.betsy>perl 1.betsy1.pl ... execution was here $VAR1 = bless( { 'my_sftp' => { 'password' => 'z', 'username' => 'y', 'domain' => 'x', 'port' => '22' } }, 'Config::Tiny' ); values are x y z 22 password authentication not available, IO::Pty is not installed or fai +led to load: Can't locate IO/Pty.pm in @INC (you may need to install +the IO::Pty module) (@INC contains: template_stuff C:\Users\tblaz\per +l5\lib\perl5/5.30.0/MSWin32-x64-multi-thread C:\Users\tblaz\perl5\lib +\perl5/5.30.0 C:\Users\tblaz\perl5\lib\perl5/MSWin32-x64-multi-thread + C:\Users\tblaz\perl5\lib\perl5 C:/Strawberry/perl/site/lib C:/Strawb +erry/perl/vendor/lib C:/Strawberry/perl/lib) at C:\Users\tblaz\perl5\ +lib\perl5/Net/SFTP/Foreign/Backend/Unix.pm line 256. at template_stuff/trans1.pm line 100. C:\Users\tblaz\Documents\evelyn\tja\1.betsy>
This is the routine that produces this output:
sub get_tiny { use 5.011; use warnings; use Net::SFTP::Foreign; use Config::Tiny; use Data::Dumper; my $ini_path = qw( C:\Users\tblaz\Documents\html_template_data\4.val +ues.ini ); say "ini path is $ini_path"; say "execution was here"; my $sub_hash = "my_sftp"; my $Config = Config::Tiny->new; $Config = Config::Tiny->read( $ini_path, 'utf8' ); say Dumper $Config; # -> is optional between brackets my $domain = $Config->{$sub_hash}{'domain'}; my $username = $Config->{$sub_hash}{'username'}; my $password = $Config->{$sub_hash}{'password'}; my $port = $Config->{$sub_hash}{'port'}; #dial up the server say "values are $domain $username $password $port"; my $sftp = Net::SFTP::Foreign->new( $domain, more => '-v', user => $username, port => $port, password => $password ) or die "Can't connect: $!\n"; return $sftp; }
All those paths in @INC looked like they're jacked up, as if the forward and backward slashed are having a tug of war.(?) But what really stands out to me in this output is that it did not change one bit when I added
more => '-v',On linux, this option shows you what the backend is doing with verbosity. My current working theory is that I have no back end.
In the original post, I posted output that was suggestive that I need to use MingW to create the backend. Is this indeed the case?
Fishing for tips,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: getting sftp to work with 2 different platforms and keypairs (updated)
by soonix (Chancellor) on Sep 16, 2019 at 21:53 UTC |