Sponsored Content
Top Forums UNIX for Advanced & Expert Users Unix FTP Script connecting through proxy Not working Post 302392572 by methyl on Thursday 4th of February 2010 09:43:19 PM
Old 02-04-2010
Code:
#!/bin/sh
ftp -n <proxy server addres> <<END_SCRIPT
quote USER '<userid>'
quote PASS '<password>'
user <remote user id>@<remote sever name> <password>

As TonyFullerMalv has spotted the above script contains spurious "quote" statements. He has also spotted that the END_SCRIPT termination line for the unix here document is missing.

Personally I would use a ".netrc" file to provide the username and password for the connection to the proxy server and then present the "user" line within a unix here document.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP script not working

hi I have made d below ftp script but the last part of script ie. moving the files after transfer (to a location in the source server only) is not working for me. Can anybody pls..help.in same..!!! ####################################################### #!/bin/sh ftp -n 10.209.13.11... (2 Replies)
Discussion started by: rookie250
2 Replies

2. Shell Programming and Scripting

connecting to remote db from unix script

Hi everybody, My bash script is trying to connect to a remote database using the 'sqlplus' binary.For this i set(export) the variable TWO_TASK to the value of database name excluding the dot extension part. Can anyone explain me what's the significance of this TWO_TASK variable while... (8 Replies)
Discussion started by: DILEEP410
8 Replies

3. Shell Programming and Scripting

ssh script for connecting unix system.

Hi All, I've a log file call netbackup.log in all the 5 servers in location usr/netbackup.log. I dont want to login in each server and check the log file. So i wanted to have a script written to have the log information at one place. I want to have the last 2 lines from the file... (2 Replies)
Discussion started by: suri.tyson
2 Replies

4. UNIX for Advanced & Expert Users

Trouble connecting to FTP proxy server

Hi Guys, I have trouble connecting to ftp server. My task is to connect to the proxy server and get the latest file to the local machine. It works fine when i do the same steps manually. I've been trying to do it in multiple ways but im just not able to connect. When i check the log, this is what... (4 Replies)
Discussion started by: stunnerz_84
4 Replies

5. SCO

SCO UNIX ftp - weird kind of working

hi, i am working on sco unix 5.07, i have 10 individual servers networked locally in which sco os is installed. one of them is not transferring the file to other servers but accepting all files. means Server (A) can accept the file through FTP from any server but not transferring FTP its own... (9 Replies)
Discussion started by: aafflatoon
9 Replies

6. Shell Programming and Scripting

Script not working after FTP

Hi Gurus, I prepared a script to process some files and then ftp the output file to mainframe directory. Here is the code snippet for the same. # Perform FTP echo "put $TGT_DR/$K.$F.$I.$K1.$RUN_TYPE '$K.$F.$I.$K1.$RUN_TYPE'" >> $LogFile ftp -i -n <<EOF >> $LogFile open... (2 Replies)
Discussion started by: svajhala
2 Replies

7. Shell Programming and Scripting

FTP using script not working (for transfering file from a remote unix server to windows PC.)

hi, Im using the following code for FTP #!/usr/bin/ksh ftp -v -n "10.29.45.11" << cmd user "mahesva" "mahesva123" get rtl.tar quit cmd Below is the log when i run the above code ********************************** Connected to 10.29.45.11. 220 (vsFTPd 2.0.1) 530 Please login with USER... (20 Replies)
Discussion started by: dll_fpga
20 Replies

8. Shell Programming and Scripting

Connecting to Windows server from UNIX through script

I am trying to connect to a Windows server say 10.1.1.10. This servers has a folder named RAJ in which there are multiple .zip files. All these zip files contain a text file called XYZ.txt. Now i have to merge the content of these XYZ.txt files from each of the .zip file and create a new text... (1 Reply)
Discussion started by: swapniljadav
1 Replies

9. IP Networking

Connecting via proxy chain to Upstream proxy

I need to configure a proxy on my local machine to use an upstream proxy (installed on another machine). The upstream proxy requires Digest/NTLM authorization. I want the local proxy to deal with the upstream proxy's authorization details and provides authorization free access to users that connect... (0 Replies)
Discussion started by: Russel
0 Replies

10. Shell Programming and Scripting

FTP script not working

Hi , Hi , seems in my code '\' is ignoring in user id and considering DB_SVCGPRUAT as a ID and failing to connect to the FTP server. my complete ID 'BD\SVCGPRUAT', how to rectify this error. #!/bin/bash myuser='"BD\_SVCGPRUAT" { BD is domain } mypass='Welcome$123'... (4 Replies)
Discussion started by: Riverstone
4 Replies
CURLOPT_FTP_ALTERNATIVE_TO_USER(3)			     curl_easy_setopt options				CURLOPT_FTP_ALTERNATIVE_TO_USER(3)

NAME
CURLOPT_FTP_ALTERNATIVE_TO_USER - command to use instead of USER with FTP SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ALTERNATIVE_TO_USER, char *cmd); DESCRIPTION
Pass a char * as parameter, pointing to a string which will be used to authenticate if the usual FTP "USER user" and "PASS password" nego- tiation fails. This is currently only known to be required when connecting to Tumbleweed's Secure Transport FTPS server using client cer- tificates for authentication. The application does not have to keep the string around after setting this option. DEFAULT
NULL PROTOCOLS
FTP EXAMPLE
TODO AVAILABILITY
Added in 7.15.5 RETURN VALUE
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. SEE ALSO
CURLOPT_FTP_SKIP_PASV_IP(3), CURLOPT_FTP_RESPONSE_TIMEOUT(3), libcurl 7.54.0 December 21, 2016 CURLOPT_FTP_ALTERNATIVE_TO_USER(3)
All times are GMT -4. The time now is 11:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy