Sponsored Content
Top Forums Shell Programming and Scripting FTP credentials from a config file Post 302534174 by ashok.k on Monday 27th of June 2011 06:11:58 AM
Old 06-27-2011
Hi,

Currently i have hardcoded the FTP user name and password in the script.

I did not use any config file.

Config file should have all the FTP user ids and password to access different folders on the same server.

Is it possible to use .netrc file? Can we have multiple user id and password for the same server in the file and select the user name and password based on the value in a variable?



Thanks
Ashok
 

10 More Discussions You Might Find Interesting

1. IP Networking

RH 7.2 FTP Server Config

Is it possible to ftp from WinXp to a Linux box? I have the the ftp server set up to take the request from the WinXp box but each time I try to connect I keep getting an error, Connection established, unknown error(windows ftp program) or if I try to ftp from the DOS prompt I get ftp connect:... (3 Replies)
Discussion started by: flounder
3 Replies

2. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

3. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

4. Shell Programming and Scripting

Issues using array credentials to read contents of a file

Hi, I am trying to read the contents of a file using array credentials in unix. The file I am trying to read is tab separated and contains the below contents. # partnerid Direc Server Port Source_Dir Target_Dir Mask Remove Files Passwordless Compare Files ... (3 Replies)
Discussion started by: aartikara
3 Replies

5. Red Hat

Apache virtual host config vs global config problem

Hi folks, I am trying to configure Apache webserver and also a virtual host inside this webserver. For Global server config: /var/www/html/index.html For virtual host config: /var/www/virtual/index.html Both client10 & www10 are pointing to 192.168.122.10 IP address. BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies

6. UNIX for Advanced & Expert Users

Need to pass credentials in one Go

Hi, We usually switch user using the below command. sudo su - user1 It then prompts for the password which we feed in. I wish to pass both the username and the password in one go thus eliminating the prompt for the password. I am using java standalone to connect to unix using... (11 Replies)
Discussion started by: mohtashims
11 Replies

7. AIX

Passing user/pass credentials to automountd map file.

How could I pass credentials to the automountd daemon through it's map files? Tried credentials=/some/file.txt - Didn't work. Tried SHARE.domain.com/user/pass/SHARE_NAME in map file - Didn't work Tried user=USER,pass=PASS - Didn't work. I can see the mounts created but when I access them... (4 Replies)
Discussion started by: Devyn
4 Replies

8. UNIX for Advanced & Expert Users

Passing credentials via .netric file in Linux

How to create netrc file...I searched in google & got to know that we have to create .netrc file in home directory, I've created .netrc file in in home directory created .netrc file in home directory more .netrc machine $HOSTNAME login xxxx password xxxxx Note: echo $HOSTNAME... (2 Replies)
Discussion started by: sam@sam
2 Replies

9. UNIX for Beginners Questions & Answers

How to check via SSH and credentials if file on remote server exists?

Hi there, I am sorry to ask that kind of beginner thing, but all the code I found online didnt work for me. All I want to do is: Check via SSH if a File exists on my webserver. The SSH login has to be with username and password. So I would be very thankful if somebody could write the line.... (8 Replies)
Discussion started by: Jens885544
8 Replies

10. SCO

Config FTP on SCO Like proftpd

i have installed and working FTP Server With SCO 5.05. But i need solve problem related to config, like proftpd (i not have installed proftpd) the recomendation on client site is enable port 113 related to inetd. but i need solve it on server side, like proftpd.conf: DefaultRoot ~... (9 Replies)
Discussion started by: Arcanisgk
9 Replies
CURLOPT_ACCEPTTIMEOUT_MS(3)				     curl_easy_setopt options				       CURLOPT_ACCEPTTIMEOUT_MS(3)

NAME
CURLOPT_ACCEPTTIMEOUT_MS - timeout waiting for FTP server to connect back SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms); DESCRIPTION
Pass a long telling libcurl the maximum number of milliseconds to wait for a server to connect back to libcurl when an active FTP connec- tion is used. DEFAULT
60000 milliseconds PROTOCOLS
FTP EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file"); /* wait no more than 5 seconds for FTP server responses */ curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L); curl_easy_perform(curl); } AVAILABILITY
Added in 7.24.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3), libcurl 7.54.0 March 06, 2016 CURLOPT_ACCEPTTIMEOUT_MS(3)
All times are GMT -4. The time now is 10:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy