X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.6 required=5.0 tests=AWL,BAYES_50,SARE_URI_CONS7,T_FILL_THIS_FORM_SHORT,URI_NOVOWEL X-Spam-Check-By: sourceware.org From: "DEWI - N. Zacharias" To: cygwin Date: Tue, 27 Jul 2010 09:12:26 +0200 Subject: AW: [bulk] - sshd - sftp problem (perl demo) Message-ID: <8CCC8F85C5F2784387A32FAD835FB4E602E71D7526@server03> References: <32E4B12749554BE2A202BD02E3053312 AT desktop2> In-Reply-To: <32E4B12749554BE2A202BD02E3053312@desktop2> Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-purgate-sourceid: 1OdeKy-0005ro-7G X-eleven-AD: Checked for spam and viruses by eXpurgate(R), see www.eleven.de for details. X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, > Von: Sisyphus > Gesendet: Dienstag, 27. Juli 2010 07:37 > An: cygwin > Betreff: [bulk] - sshd - sftp problem (perl demo) > > Hi, > > I have the following perl script that attempts to connect (from native > Windows) to an sshd server (either localhost, which is a Cygwin sshd serv= er, > or a remote linux host) > and create a Net::SSH2::SFTP object. > > ############################### > use warnings; > use Net::SSH2; > > my ($host, $user, $pass) =3D qw(blah blah blah); > > my $ssh2 =3D Net::SSH2->new; > die "can't connect" unless $ssh2->connect($host); > > print "Connected\n"; > > die "can't authenticate" > unless $ssh2->auth(username =3D> $user, > password =3D> $pass); Have a look at http://prlmnks.org/html/569657.html they mentioned that auth does not work # authorize # this works but I use keys below # $ssh2->auth_password('z','foopass') or die "Unable to login $@ \n"; #this dosn't work #$ssh2->auth(username=3D>'z', interact =3D> 1); Maybe it helps. Have fun Norbert -------------------------------------------------------------------------- Dipl. Phys. Norbert Zacharias Wind Measurements & Power Curve Measurements DEWI GmbH Ebertstrasse 96 26382 Wilhelmshaven Germany Tel.: +49 4421 4808 876 Fax: +49 4421 4808 843 Email: N DOT Zacharias AT dewi DOT de Home: http://http://www.dewi.de DEWI GmbH - Deutsches Windenergie-Institut, Wilhelmshaven Commercial Register No.: Amtsgericht Oldenburg, HRB 130241 Managing Director: Jens Peter Molly Chairman of the supervisory board: Ministerialrat Dr. Niels K=E4mpny P Please consider the environment before printing this email. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple