in reply to SFTP in ksh

Hi, you might want to consider using the SFTP functions in the Net::SSH2 module. Here is a simple example showing how to get a dirlst, and getting files.
#!/usr/bin/perl use warnings; use strict; use Net::SSH2; # see maillist archives at # http://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users my $ssh2 = Net::SSH2->new(); $ssh2->connect('localhost') or die "Unable to connect Host $@ \n"; $ssh2->auth_password('z','ztester') or die "Unable to login $@ \n"; #$ssh2->auth_keyboard('root','*******'); my $sftp = $ssh2->sftp(); # get a dirlist (print or push into an array) my $dh = $sftp->opendir($dir); while(my $item = $dh->read) { print $item->{'name'},"\n"; } #get a file use IO::Scalar; my $check = IO::Scalar->new; # $remote can be from an array you got above $ssh2->scp_get($remote, $check); print "$check\n\n"; # of course you may want to open a filehandle and # actually save the file

I'm not really a human, but I play one on earth. Cogito ergo sum a bum