<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic cannot login into the SFTP server using Net::SFTP in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094576#M83188</link>
    <description>hi everyone&lt;BR /&gt;&lt;BR /&gt;we're using Public/Private Key authentication between SFTP client and server to trnasfer files.&lt;BR /&gt;I can login into SFTP server from my client linux machine without problems using this command:&lt;BR /&gt;&lt;BR /&gt;# sftp user@server (without password)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but if i try to use a Net::SFTP perl script it doesn't work:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;use Net::SFTP;&lt;BR /&gt;&lt;BR /&gt;my $server="X.X.X.X";&lt;BR /&gt;&lt;BR /&gt;my $user="myuser";&lt;BR /&gt;&lt;BR /&gt;my $password="";&lt;BR /&gt;&lt;BR /&gt;my %args = (user =&amp;gt; "$user", password =&amp;gt; "$password", ssh_args =&amp;gt; [port =&amp;gt; 22]); &lt;BR /&gt;&lt;BR /&gt;my $file="TEST.CSV"; &lt;BR /&gt;&lt;BR /&gt;my $sftp=Net::SFTP-&amp;gt;new($server, %args);&lt;BR /&gt;&lt;BR /&gt;$sftp-&amp;gt;put($file);&lt;BR /&gt;&lt;BR /&gt;exit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I get the following error:&lt;BR /&gt;&lt;BR /&gt;# perl test.cgi&lt;BR /&gt;Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 245.&lt;BR /&gt;Couldn't get handle: No such file or directory at test.cgi line 20&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;howto solve this problem ?&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 30 Oct 2007 12:57:28 GMT</pubDate>
    <dc:creator>'chris'</dc:creator>
    <dc:date>2007-10-30T12:57:28Z</dc:date>
    <item>
      <title>cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094576#M83188</link>
      <description>hi everyone&lt;BR /&gt;&lt;BR /&gt;we're using Public/Private Key authentication between SFTP client and server to trnasfer files.&lt;BR /&gt;I can login into SFTP server from my client linux machine without problems using this command:&lt;BR /&gt;&lt;BR /&gt;# sftp user@server (without password)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;but if i try to use a Net::SFTP perl script it doesn't work:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;use Net::SFTP;&lt;BR /&gt;&lt;BR /&gt;my $server="X.X.X.X";&lt;BR /&gt;&lt;BR /&gt;my $user="myuser";&lt;BR /&gt;&lt;BR /&gt;my $password="";&lt;BR /&gt;&lt;BR /&gt;my %args = (user =&amp;gt; "$user", password =&amp;gt; "$password", ssh_args =&amp;gt; [port =&amp;gt; 22]); &lt;BR /&gt;&lt;BR /&gt;my $file="TEST.CSV"; &lt;BR /&gt;&lt;BR /&gt;my $sftp=Net::SFTP-&amp;gt;new($server, %args);&lt;BR /&gt;&lt;BR /&gt;$sftp-&amp;gt;put($file);&lt;BR /&gt;&lt;BR /&gt;exit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I get the following error:&lt;BR /&gt;&lt;BR /&gt;# perl test.cgi&lt;BR /&gt;Use of uninitialized value in concatenation (.) or string at /usr/local/share/perl/5.8.8/Net/SFTP.pm line 245.&lt;BR /&gt;Couldn't get handle: No such file or directory at test.cgi line 20&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;howto solve this problem ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Oct 2007 12:57:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094576#M83188</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2007-10-30T12:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094577#M83189</link>
      <description>&lt;!--!*#--&gt;I know nothing, but if line 20 is this one:&lt;BR /&gt;&lt;BR /&gt;   $sftp-&amp;gt;put($file);&lt;BR /&gt;&lt;BR /&gt;and the complaint is "No such file or&lt;BR /&gt;directory", then I'd want to know if there&lt;BR /&gt;really is a "TEST.CSV".</description>
      <pubDate>Tue, 30 Oct 2007 13:41:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094577#M83189</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-10-30T13:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094578#M83190</link>
      <description>the file TEST.CSV is there !</description>
      <pubDate>Tue, 30 Oct 2007 14:05:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094578#M83190</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2007-10-30T14:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094579#M83191</link>
      <description>&amp;gt; the file TEST.CSV is there !&lt;BR /&gt;&lt;BR /&gt;A transcript showing "ls -l" output would be&lt;BR /&gt;much more persuasive than your opinion/claim.&lt;BR /&gt;Evidence that you're looking at the same&lt;BR /&gt;directory as the script would also be nice.</description>
      <pubDate>Tue, 30 Oct 2007 14:14:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094579#M83191</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-10-30T14:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094580#M83192</link>
      <description># ls -la&lt;BR /&gt;total 300&lt;BR /&gt;drwxr-xr-x  5 root  root    4096 2007-10-30 20:15 .&lt;BR /&gt;drwxr-xr-x 28 root  root    4096 2007-10-30 19:37 ..&lt;BR /&gt;-rw-r--r--  1 root  root  113280 2007-10-30 11:30 libmath-pari-perl_2.010709.orig.tar.gz&lt;BR /&gt;-rw-r--r--  1 root  root    9465 2007-10-29 20:31 libnet-sftp-perl_0.10-1.diff.gz&lt;BR /&gt;-rw-r--r--  1 root  root     392 2007-10-29 20:31 libnet-sftp-perl_0.10-1.dsc&lt;BR /&gt;-rw-r--r--  1 root  root   24676 2007-10-29 20:30 libnet-sftp-perl_0.10.orig.tar.gz&lt;BR /&gt;drwxrwxrwx  9 root  root    4096 2007-10-30 11:30 Math-Pari-2.010709&lt;BR /&gt;drwxr-xr-x  7   500   500   4096 2007-10-30 11:31 Net-SFTP-0.10&lt;BR /&gt;drwxr-xr-x  6 linux linux   4096 2007-10-30 11:25 Net-SSH-Perl-1.24&lt;BR /&gt;-rw-r--r--  1 root  root   92276 2007-10-30 11:22 Net-SSH-Perl-1.24.tar.gz&lt;BR /&gt;-rw-r--r--  1 root  root    4233 2007-10-30 17:55 sftp.cgi&lt;BR /&gt;-rw-r--r--  1 root  root    4210 2007-10-30 11:47 sftp_old.cgi&lt;BR /&gt;-rw-r--r--  1 root  root     399 2007-10-30 20:14 test.cgi&lt;BR /&gt;-rw-r--r--  1 root  root      22 2007-10-29 14:13 TEST.CSV&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:17:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094580#M83192</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2007-10-30T14:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094581#M83193</link>
      <description>to put this file manually works without any problems:&lt;BR /&gt;&lt;BR /&gt;# sftp myuser@X:X:X:X&lt;BR /&gt;Connecting to X:X:X:X...&lt;BR /&gt;sftp&amp;gt; put TEST.CSV&lt;BR /&gt;Uploading TEST.CSV to /HOME/TEST.CSV&lt;BR /&gt;TEST.CSV                                                                                    100%   22     0.0KB/s   00:00&lt;BR /&gt;# &lt;BR /&gt;</description>
      <pubDate>Tue, 30 Oct 2007 14:38:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094581#M83193</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2007-10-30T14:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094582#M83194</link>
      <description>this problem is solved now !&lt;BR /&gt;&lt;BR /&gt;$sftp-&amp;gt;put($file, $file) or die "could not upload a file\n";&lt;BR /&gt;&lt;BR /&gt;greetings&lt;BR /&gt;chris</description>
      <pubDate>Tue, 30 Oct 2007 16:17:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094582#M83194</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2007-10-30T16:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: cannot login into the SFTP server using Net::SFTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094583#M83195</link>
      <description>I wonder this script should have worked before.&lt;BR /&gt;&lt;BR /&gt;Though I never have used this module Net::SFTP a quick look at its POD already in the SYNOPSIS section revealed that the module's put method requires at least two args, viz. local and remote file name.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP.pm" target="_blank"&gt;http://search.cpan.org/~dbrobins/Net-SFTP-0.10/lib/Net/SFTP.pm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Besides, this quoting of $user and $password shouldn't be necessary&lt;BR /&gt;&lt;BR /&gt;my %args = (user =&amp;gt; "$user", password =&amp;gt; "$password",</description>
      <pubDate>Wed, 31 Oct 2007 08:49:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/cannot-login-into-the-sftp-server-using-net-sftp/m-p/4094583#M83195</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-10-31T08:49:31Z</dc:date>
    </item>
  </channel>
</rss>

