954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Need SFTP script

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

prabha24107
Newbie Poster
1 post since Aug 2009
Reputation Points: 10
Solved Threads: 0
 
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?

Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

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.

Jackmandu
Newbie Poster
1 post since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

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...

Scriptaholic
Newbie Poster
1 post since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You