Need SFTP script

Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2009
Posts: 1
Reputation: prabha24107 is an unknown quantity at this point 
Solved Threads: 0
prabha24107 prabha24107 is offline Offline
Newbie Poster

Need SFTP script

 
0
  #1
Aug 26th, 2009
Hi All,

I am new in SFTP.
1)I need to transfer the file from one server to another server.
2) I have written .com file in my ALPHA VMS system with SQLquery.
3) Usually I send .com file through NDM protocol. In this file i write NDM script in the file for sending the file.

$!copy/log ie_acctinfo.dat MEDDEV::NDM_SEND:ie_acctinfo.dat

$!copy/log nl: MEDDEV::NDM_SEND:ie_acctinfo.dat_ack

this script we use inside the file. and then we can submit the file

@ie_acctinfo.com
--------------------------------
But this enhancement(project) I should use SFTP(SSH).
1) Both system(myside and other application(server)) side are generated and exchanged the public key.
2) now i need to the SFTP script inside the .com file and send(submit) SFTP script.

I really appriciate your help and spending time for me.

Thanks, prabha
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Need SFTP script

 
0
  #2
Aug 26th, 2009
I am new in SFTP.
...
2) now i need to the SFTP script inside the .com file and send(submit) SFTP script.
And how much time have you spent reading manuals, trying things etc?
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 1
Reputation: Jackmandu is an unknown quantity at this point 
Solved Threads: 0
Jackmandu Jackmandu is offline Offline
Newbie Poster
 
0
  #3
Oct 20th, 2009
Wow, that was a really profound and useful reply to a sincere question. Not the least bit presumptuous, rude or arrogant. Let me ask you this Salem: if Prabha didn't actually take the time to try things and read manuals and his question is just a waste of your time; why would you waste any time responding at all? Help someone or be silent; your sarcasm doesn't benefit anyone.
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 1
Reputation: Scriptaholic is an unknown quantity at this point 
Solved Threads: 0
Scriptaholic Scriptaholic is offline Offline
Newbie Poster
 
0
  #4
30 Days Ago
Jackmandu... applaud you sir!
Its crazy how people get off on being pretentious on message boards.... if he knew how to get the answer, the problem wouldn't have been posted.

Now to answer prabha24107

Place the private key in your $home/.ssh/
directory and call it $whatever.key

go into your .profile and create an alias

something like
alias -x $alias_name="sftp -oIdentityFile=$HOME/.ssh/$whatever.key username@xx.xx.xxx.xx"

however you choose to write your script, you can now call this alias and be able to sftp however you like. I hope this helps.

Salem is a real sit down guy...
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC