Hello Everyone! Here is an update I sent to Kamal, just an FYI to give you more information.
Thanks, David Fish Senior Systems Analyst Property System Services Work (301) 380-3331 BlackBerry (301) 646-8985 [EMAIL PROTECTED] -----Original Message----- From: Fish, David Sent: Monday, December 03, 2007 2:53 PM To: 'kamal' Subject: RE: SFTP and SSH - Does it work in Windows? Hello! I switched to attempt using keys instead of a login and password, but both of the attempts are failing. This was the basic script I was writing to just login to the server using sftp. If I go into cygwin shell and type sftp [EMAIL PROTECTED] it connects just fine. There error I am getting is: Net::SSH: Bad host name: [EMAIL PROTECTED] at C:/Perl/site/lib/Net/SFTP.pm line 61 I looked in the SFTP.pm and it is looking for the login and password. I setup my program to provide a login and password and I get the following error: Can't set socket non-blocking: Bad file descriptor at C:/Perl/site/lib/Net/SSH/P erl.pm line 216. Thanks for your help, #Key Code use Net::SFTP; $host="[EMAIL PROTECTED]"; # Open the FTP Connection to the Mercury ftp server if(! ($sftp = Net::SFTP->new($host))) { print STDOUT "Net::SFTP Failed: $! for host $host \n"; return("1"); } else { print STDOUT "NET::SFTP Successful $! for host $host\n"; } # Login the user for this connection if( ! $sftp->ls) { print STDOUT " ls Failed $! "; return("2"); } else { print STDOUT " ls Successful $! "; } #User Code use Net::SFTP; $host="IP"; $user="user1"; $passwd="pass1"; # Open the FTP Connection to the Mercury ftp server if(! ($sftp = Net::SFTP->new($host, $user, $passwd))) { print STDOUT "Net::SFTP Failed: $! for host $host \n"; return("1"); } else { print STDOUT "NET::SFTP Successful $! for host $host\n"; } # Login the user for this connection if( ! $sftp->ls) { print STDOUT " ls Failed $! "; return("2"); } else { print STDOUT " ls Successful $! "; } David Fish Senior Systems Analyst Property System Services Work (301) 380-3331 BlackBerry (301) 646-8985 [EMAIL PROTECTED] -----Original Message----- From: kamal [mailto:[EMAIL PROTECTED] Sent: Monday, December 03, 2007 1:42 PM To: Fish, David Subject: Re: SFTP and SSH - Does it work in Windows? try using -v and debug, to get a better idea of what errors you are getting i have Win XP ssh, using Cygwin, working to a Unix host -Kamal. ----- Original Message ----- From: "Fish, David" <[EMAIL PROTECTED]> To: <perl-win32-users@listserv.ActiveState.com>; <[EMAIL PROTECTED]> Sent: Monday, December 03, 2007 1:06 PM Subject: SFTP and SSH - Does it work in Windows? > Hello! I have been reviewing over several google searches and the use > of SSH and SFTP on Windows XP to a Unix box does not look to promising. > The Unix SSH/SFTP I am using is Cygwin. Has anyone got this to work in > a Windows to Unix? Am I going down a endless of errors trying to get > this to work? > > > > > David Fish > Senior Systems Analyst > Property System Services > Work (301) 380-3331 > BlackBerry (301) 646-8985 > [EMAIL PROTECTED] > > _______________________________________________ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs