On Nov 2, 6:06 am, [EMAIL PROTECTED] (Lerameur) wrote: > On Nov 1, 9:29 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote: > > > > > On 11/1/07, lerameur <[EMAIL PROTECTED]> wrote: > > > > I wrote a small script, the manual upload of a file works, but gives > > > me an error message:unable to initialize mechanism library [/usr/lib/ > > > gss/gl/mech_krb5.so] > > > Could some tell me what this is about? it does end up transferirng the > > > file. > > > As near as I can guess, that library file (which, I'd further guess > > has something to do with Kerberos authentication) is borked. Exactly > > what's wrong with it is anyone's guess. Probably there's something > > else that succeeds as a fallback, since the file gets transferred; so > > you could perhaps configure it somehow to not even try using Kerberos. > > You might be able to turn on a debugging mode to find out more > > information; check the documentation for the modules you're using. > > (When you post a question, mention which modules you're using, and we > > may be able to give you more specific help.) > > I am having success with manually transfering my files between the two > servers. Unfortunately I do not have root access to the other server > and the .ssh directory is hidden. You don't need root access to access/edit your ssh files. > > manually: > Server1200:/input/spam>scp 20071102093215.txt 174.34.34.34:/home/input/ > traffic_log > [EMAIL PROTECTED]'s password: > 20071102093215.txt | 42MB | 6.0MB/s | TOC: 00:00:07 | 100% > Server1200:/input/spam> > > here the SCP part of my script: > > ..... > $SCP=Net::SCP->new($host,Timeout=>240) or $newerr=1; #Establishing the > connectiong > push @ERRORS, "Can't SCP to $host: $!\n" if $newerr; > myerr() if $newerr; > print "Connected\n"; > > $SCP->login("$user","$password") or $newerr=1; The Net::SCP module uses ssh keys for its authentication. If you want to pass the password, you'll want to use Net::SCP::Expect http://search.cpan.org/perldoc?Net%3A%3ASCP%3A%3AExpect
> print "Getting file list\n"; > push @ERRORS, "Can't login to $host: $!\n" if $newerr; > $SCP->quit if $newerr; > myerr() if $newerr; > print "Logged in\n"; > > $SCP->cwd($directory) or $newerr=1; > push @ERRORS, "Can't cd $!\n" if $newerr; > myerr() if $newerr; > $SCP->quit if $newerr; > > $SCP->put($file_to_put) or die $SCP->{errstr}; # DIES > HERE...............!!!!!!!! > print "Putting file and quitting \n"; > > The directory exists, I do not know why, any ideas? > anything else would be needed? > > thanks > ken -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/