05-24-2013
Batch script to run in SFTP
Hello Guys,
I am writting a script which is SFTPing from Solaris to Windows.
I need to run a Batch script in SFTP session (ongoing) which will map a network drive and then transfer my files.
I can run the Batch script via SSH but not via SFTP and this mapping is limited to that SSH session.
Please suggest.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Im new to unix shell scripting, I have to run batch jobs on unix. for example i have 5 jobs. first 2 can kickoff parallely. after completely finishing the 2 previous jobs the 3 job should kick off..once 3rd is over 4 th and 5th can kick off parallely. Each jobs run for 1 or 2 hours each.
How to... (2 Replies)
Discussion started by: venki311
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am running an sftp batch script.
sftp -b user@host <<EOF >> /tmp/file.out
binary
put file.txt
bye
EOF
However, I am getting errors.
No such file or directory (user@host).
I checked the forums which says I need to access the current process eg for linux I would... (3 Replies)
Discussion started by: Bab00shka
3 Replies
3. Shell Programming and Scripting
I am working on a sftp batch script on a Solaris machine and I need to connect using password. This is not an issue when i do it manually but when I want to make this into a script, i find there are no options for password.
Can anyone suggest how I can do it with password? I know using keys is... (3 Replies)
Discussion started by: Leion
3 Replies
4. Shell Programming and Scripting
the manual process which we follow is login to remote unix box thro putty using the unix account and password and then sudo to root user.
server name:abc@server.com
login as:pqrst
password:******
$ sudo su - root
then run the script stored on remote server under root account.
... (9 Replies)
Discussion started by: gpk_newbie
9 Replies
5. Shell Programming and Scripting
Hi all,
i need to run a shell script on remote server. I have created file .bat file in windows server with following code,
c:\Users\Desktop\putty.exe -ssh -pw password user@server ./script.sh
i need to run the script.sh in my remote server
Above command is not working, any... (4 Replies)
Discussion started by: rammm
4 Replies
6. AIX
I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check?
Thanks (7 Replies)
Discussion started by: rainbow_bean
7 Replies
7. Shell Programming and Scripting
Hi All,
I am working on shell scripting.My script is completed but I have one task that is to trigger the batch script(with or without parameter) from my shell scripting(reside on linux system) and output which is geneareted by the batch should e.g. if batch script creates any files then I want... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies
8. UNIX for Advanced & Expert Users
Hi
I am checking status of sftp in Health check script, sftp command is used to connect the server with secure RSA key, which is successfully get connected most of the time but in some case if RSA key ask for password then I need to exit sftp command after few second and continue to run... (1 Reply)
Discussion started by: ketanraut
1 Replies
9. Shell Programming and Scripting
Hi,
Can anyone tell me how to pass password in a shell script for sftp so that i can run it in background without user entering the password?
I used a expect script but it timesout after some time and the process remains incomplete at the end.
Can anyone suggest any other idea?
Will the... (3 Replies)
Discussion started by: Little
3 Replies
10. Shell Programming and Scripting
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies
LEARN ABOUT DEBIAN
net::sftp::foreign::compat
Net::SFTP::Foreign::Compat(3pm) User Contributed Perl Documentation Net::SFTP::Foreign::Compat(3pm)
NAME
Net::SFTP::Foreign::Compat - Adaptor for Net::SFTP compatibility
SYNOPSIS
use Net::SFTP::Foreign::Compat;
my $sftp = Net::SFTP::Foreign::Compat->new($host);
$sftp->get("foo", "bar");
$sftp->put("bar", "baz");
use Net::SFTP::Foreign::Compat ':supplant';
my $sftp = Net::SFTP->new($host);
DESCRIPTION
This package is a wrapper around Net::SFTP::Foreign that provides an API (mostly) compatible with that of Net::SFTP.
Methods on this package are identical to those in Net::SFTP except that Net::SFTP::Foreign::Attributes::Compat objects have to be used
instead of Net::SFTP::Attributes.
If the ":supplant" tag is used, this module installs also wrappers on the "Net::SFTP" and Net::SFTP::Attributes packages so no other parts
of the program have to modified in order to move from Net::SFTP to Net::SFTP::Foreign.
Setting defaults
The hash %Net::SFTP::Foreign::DEFAULTS can be used to set default values for Net::SFTP::Foreign methods called under the hood and otherwise
not accesible through the Net::SFTP API.
The entries currently supported are:
new => @opts
extra options passed to Net::SFTP::Foreign constructor.
get => @opts
extra options passed to Net::SFTP::Foreign::get method.
put => @opts
extra options passed to Net::SFTP::Foreign::put method.
ls => @opts
extra options passed to Net::SFTP::Foreign::ls method.
COPYRIGHT
Copyright (c) 2006-2008, 2011 Salvador Fandin~o
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-04 Net::SFTP::Foreign::Compat(3pm)