The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script(s) to Automate Tasks droppedonjapan Shell Programming and Scripting 2 05-21-2008 10:32 AM
script to automate mksysb via nim in AIX 5.3 barkath Shell Programming and Scripting 0 12-20-2007 06:46 PM
here document to automate perl script that call script hogger84 Shell Programming and Scripting 3 10-22-2007 10:15 AM
Automate batchfile generation for sFTP mpang_ Shell Programming and Scripting 0 04-26-2006 05:34 AM
automate the input in a script erwinspeybroeck UNIX for Dummies Questions & Answers 11 01-31-2002 10:54 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-01-2006
neveryman neveryman is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 1
I struggled with this problem for quite a while before discovering lftp.

For Solaris you can get a copy at SunFreeware.

It allows you to use a shell type script with a password embedded for those servers that do not allow you to place a public key on them for passwordless authentication.

The "mirror" option is very handy indeed. Much easier to use than expect.
  #2 (permalink)  
Old 08-25-2006
yvonneb yvonneb is offline
Registered User
  
 

Join Date: Aug 2006
Location: El Paso, Texas
Posts: 3
I am also trying to automate sftp thru a cron file to be run every evening. My question is if I generate the key on the secure server and move it over to my server, will it affect other users from other servers. In other words can they still use their password to get into the secure server, or would they too have to copy a key over their server.
  #3 (permalink)  
Old 10-17-2006
amitgupta_itbhu amitgupta_itbhu is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 1
Please send that script to the forum

Quote:
Originally Posted by priyamurthy2005
Hi All,
I need to write a UNIX script that automates the sftp process. I should be able to do a sftp to a secure box and get a file from there. I am having a problem doing this because no matter what I do, when I run my script, I get a prompt at command line asking for a password. How could I automate this? Could someone give me a sample script?
Thanks in advance.
Priya

Hi Priya could u please share that script for automating SFTP with all of us.
  #4 (permalink)  
Old 10-17-2006
sbasetty sbasetty is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 75
Can you try this and let me know


ftpsrv='XX.XX.XXX.XXX'
uid=myuser
passwd=mypass
ftp -n hit-dw << endftp
user $uid $passwd
cd /file_folder
bye
endftp
  #5 (permalink)  
Old 10-17-2006
yvonneb yvonneb is offline
Registered User
  
 

Join Date: Aug 2006
Location: El Paso, Texas
Posts: 3
I too am interested in this thread. I tried what you recommended and I received this error message:

ftp: Unknown Host hit-dw
Name does not resolve to supplied parameters; neither nodename nor servname were
passed.

Thanx,
  #6 (permalink)  
Old 10-17-2006
sbasetty sbasetty is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 75
Did you try changing the "hit-dw" with your local server name.
  #7 (permalink)  
Old 10-17-2006
yvonneb yvonneb is offline
Registered User
  
 

Join Date: Aug 2006
Location: El Paso, Texas
Posts: 3
Duh, dummy me. Yes, after I posted a reply I realized what I should have done. I added the ip address of the secure server to ftpsvr and the name of the secure server for hit-dw. I also tried using the server I was ftping from for ftpsvr and that didn't work either. I got the following error message:
ftp: connect: Connection refused
Not connected.
Not connected.
Not connected.
Not connected.
Closed Thread

Bookmarks

Tags
linux, linux commands, mtime, sftp script, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:41 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0