[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Unable to do a SFTP to a secure server
- Subject: Re: [sqr-users] Unable to do a SFTP to a secure server
- From: Robert Goshko <robert.goshko@gmail.com>
- Date: Thu, 1 Dec 2005 08:11:10 -0700
- Delivery-date: Thu, 01 Dec 2005 10:13:03 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;b=UrkwaqmMtfpYint+HiQHgJIVHg/L1BJ68hrj1HkObjmFEAthqQyRWmFVHHby+O2E3wf0tCBqmjPriYWiSrsywHc0ioc1Bg2TIhtd6sFE/jSi+PO49aH5DTlsk2Io+eMKjWklsHVsa6VcQR3URY2cvkf4L6efsxy8sN1g3EZP7sU=
- In-reply-to: <OFCC03C169.25D01958-ON852570CA.00458850-852570CA.004632B5@nexnet.navy.mil>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- References: <OFCC03C169.25D01958-ON852570CA.00458850-852570CA.004632B5@nexnet.navy.mil>
On 01/12/05, Robin_Ferebee@nexnet.navy.mil
<Robin_Ferebee@nexnet.navy.mil> wrote:
> Good morning. I am attempting to FTP a file from my PeopleSoft unix
> server to a secure unix server. I created a batchfile, but I'm not sure
> how to execute the command to ftp. Here is my code:
>
> Open $ScriptFile as 1 For-Writing Record=800 Status=#Open1
> Let $ScriptData = 'user xxxx yyyyy' !Production
> Write 1 from $ScriptData
> Let $ScriptData = 'lcd '||$Unix_dir
> Write 1 from $ScriptData
> Let $ScriptData = 'cd '||$Merch_Path
> Write 1 from $ScriptData
> Let $ScriptData = 'user ssh xxxxxx yyyyyy'
> Write 1 from $ScriptData
> Let $ScriptData = 'sftp merch@merchweb1'
> Write 1 from $ScriptData
> Let $ScriptData = 'eat34bugs2day'
> Write 1 from $ScriptData
> Let $ScriptData = 'put ' || $filename||' '|| $filename
> Write 1 from $ScriptData
> Let $ScriptData = 'quit'
> Write 1 from $ScriptData
> Let $ScriptData = 'exit'
> Write 1 from $ScriptData
> Close 1
>
> Let $BatchExec = 'sftp '|| '-B hqsun4 <' ||$ScriptFile ||'> ' ||
> $ScriptLog {This line creates the error}
I think you want -b here, the -B parameter is usually to adjust the
buffer size, and from you command you probably want the batch file to
be a dash meaning stdin and sftp needs the user and host on the
command line.
let $BatchExec = 'sftp -b - user@host < ' || $ScriptFile || ' > ' || $ScriptLog
> Let $CommandString = $BatchExec
> Call System Using $CommandString #Status Wait
Usually you will want the ssh set-up to function with public key
authentication so there is no need to enter a password, makes things
much simpler.
--
...Rob
-- No trees were killed in the sending of this message. However a
large number of electrons were terribly inconvenienced.
================================================
Robert Goshko
Registered Linux User #260513
Want a Gmail account, 2.6+ GB web mail (for free), just ask me.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users