943,931 Members | Top Members by Rank

Ad:
Aug 26th, 2009
0

Need SFTP script

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
prabha24107 is offline Offline
1 posts
since Aug 2009
Aug 26th, 2009
0

Re: Need SFTP script

Quote ...
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?
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
Oct 20th, 2009
0
Re: Need SFTP script
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Jackmandu is offline Offline
1 posts
since Oct 2009
Nov 6th, 2009
0
Re: Need SFTP script
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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Scriptaholic is offline Offline
1 posts
since Nov 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Shell Scripting Forum Timeline: Problem printing date
Next Thread in Shell Scripting Forum Timeline: automation scripts--help needed urgent





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC