sftp script needed for solaris box


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sftp script needed for solaris box
# 1  
Old 03-25-2009
Error sftp script needed for solaris box

Hi ,

I have a solaris box through which i need to connect to ATM's and pull files using sftp. I did same type of scripting using ftp before but no sftp.The problem now i am facing is, i want to put the password along with this sftp (non-interactive) script. Unfortunately there is no options for putting password in sftp. Please enlighten me for this issue.

Your precious help will be highly appreciated

Thanks
Renjesh Raju
# 2  
Old 03-25-2009
you need to install " Expect" then try the autoexpect which comes with that. It will write the script for you. Can't beat that. :-)

Expect - Expect - Home Page
# 3  
Old 03-25-2009
IMO ..... Better off setting up a pub/pri key based solution....
most sftp implementations also support the -b flag for specifying a file to read it from.
# 4  
Old 03-25-2009
when using sftp, an .rhosts file needs to be created on the atm servers, so tht during the sftp it doesnt prompt you for a password
after that use the -b option for running it in non-interactive mode.

sftp -b batchfile
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

2. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

3. Shell Programming and Scripting

Need a script to add mutiple printers in solaris box

Hi , i need to configure around 80 printers in a server. can someone please help me with the script. i have a file that has printer name and its ip. like. printer1 1.1.1.1 printer2 0.0.0.0 and so on.. can some one please help me to do it via script. i am using solaris 10 ... (0 Replies)
Discussion started by: chidori
0 Replies

4. Shell Programming and Scripting

Problem with a script on a solaris 10 box

Hi Gurus I have several SAN's in two different locations. I collect performance data and archive them. In one location the archiving script runs on a solaris 9 server and in the other on a solaris 10 server. But the script fails every day on the solaris 10 server with this mes6=`/usr/bin/du -sk... (5 Replies)
Discussion started by: gnom
5 Replies

5. Shell Programming and Scripting

SFTP script help is needed

Hello all and Happy 2010! I have following problem and I do not have a full solution yet. Maybe someone of you could help .... I have remote sevrer A and I am connecting from my local server via SFTP to download .TXT files. -Files are dropped at random times into download folder on server A... (7 Replies)
Discussion started by: kalimero
7 Replies

6. Shell Programming and Scripting

SFTP from UNIX to ALPHA Box (Stream_LF)

Hello, I have a variable length record file that I am trying to SFTP from a UNIX box to a VMX Alpha box. I have no problem with any authenication. Every time I transfer the file, the file gets converted to a Stream_LF file layout on the VMS box. I have the logical on the VMS side... (0 Replies)
Discussion started by: blt123
0 Replies

7. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

8. UNIX for Dummies Questions & Answers

SFTP file from unix box to a NT server

Hi, I've searched but I haven't found a clear answer on this. Is it possible to sftp a file from a unix box to an NT server (windows)? If it is possible how do I go about doing it? Any help would be much appreciated! Thank You! (5 Replies)
Discussion started by: queenie680
5 Replies

9. UNIX for Dummies Questions & Answers

difference between AIX box and Sun Solaris box

Hi, I need a clarification. Is there any difference between AIX box and Sun Solaris box? The bzip command with -c option works in AIX box and the same does not work in Sun Solaris box. Can anyone please explain if there is an implementation difference in both these boxes for the shell... (1 Reply)
Discussion started by: nisha4680
1 Replies

10. Shell Programming and Scripting

sftp script needed

Hello all, need help to write a smal script to send files to remote sys using sftp @ HP UNIX environment. Thanks (1 Reply)
Discussion started by: ravi.sadani19
1 Replies
Login or Register to Ask a Question