Ftps connection by ksh script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Ftps connection by ksh script
# 1  
Old 05-09-2014
Ftps connection by ksh script

Hi,
I'm trying to access to FTP SERVER over SSL with this script unix :
(credentials are correct)

Code:
#!/usr/bin/ksh
USER="test"
PASSWORD="pwdtest"
IP="**.***.*.***"
ftp -s $IP 990 << EOF >>log_ftp
user $USER $PASSWORD
bin
passive
EOF

but seems that credentials are not passed correctly:

Code:
TLS Auth Entered.
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 0 (0x0)
        Issuer: *******
        Validity
            Not Before: Sep 23 08:28:59 2013 GMT
            Not After : Sep 23 08:28:59 2014 GMT
        Subject: *******
Name (*.*.*.*:user):

Where is the error in script ?
# 2  
Old 05-09-2014
try
Code:
ftp -in $IP << EOF > ~/log.txt 2>&1
user $USER $PASSWORD

-i Turns off interactive prompting during multiple file transfers.

-n Restrains ftp from attempting "auto-login" upon initial connection.
If auto-login is enabled, ftp will check the .netrc (see netrc(5))
file in the user's home directory for an entry describing an
account on the remote machine. If no entry exists, ftp will prompt
for the remote machine login name (default is the user identity on
the local machine), and, if necessary, prompt for a password and an
account with which to login.
# 3  
Old 05-09-2014
now, with your suggestion the error is :

" Have to use explicit SSL/TLS before logging on.
Login failed "
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Best way to transfer files to remote FTPS server instead of local FTPS server

Hi, I am working on an application which runs on an Informatica Red-Hat 5.10 Linux Server. The application involves several Informatica ETL workflows which generate 100s of Text files with lot of data. Many of the files will each be up to 5 GB in size. Currently the Informatica server itself... (7 Replies)
Discussion started by: waavman
7 Replies

2. Shell Programming and Scripting

FTPS Connection script

I have a requirement for which I had to connect to a server using FTPS. I have been provided with these, connection method: FTPS Server Name Port for explicit and implicit Login user I would like to know the FTPS command/script in order to connect to there server and get a file. ... (5 Replies)
Discussion started by: r@v!7*7@
5 Replies

3. UNIX for Dummies Questions & Answers

For SFTP connection - How to give password in UNIX Script (ksh)

Hi, I am not able to give the password in Unix script for SFTP connection. When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script. sftp -v user@xyz.com. ... (4 Replies)
Discussion started by: Vineeta Nigam
4 Replies

4. UNIX for Dummies Questions & Answers

Query: How to install commercial cert into AIX and use it for FTPS connection

Hi Techies, I wish to check with everyone here something regarding Configuration of FTPS Server in AIX using Commercial Digital Cert instead of Sel Sign Cert. I'm working as system integration designer and I'm currently working on a interface which involves integration btw two systems using... (6 Replies)
Discussion started by: mkmuraly
6 Replies

5. Shell Programming and Scripting

ksh connection to other servers

Hello, I am looking for a way for a server to launch a connection command to one of the other servers where the connection command has already embedded in it a server name, user name and a password. (2 Replies)
Discussion started by: LiorAmitai
2 Replies

6. Shell Programming and Scripting

FTPS Script to move a file to Unix Folder

Dear Experts, I need to connect to a FTPS Server and move the files from FTPS folder "/SAP/Out" to Unix directory "/SAP/In". I need to run this script on Unix directory...Script should get the files from FTPS folder and place that in specified Unix Directory. Thanks In Advance. (1 Reply)
Discussion started by: phani333
1 Replies

7. Shell Programming and Scripting

KSH 88 - Can I find the PID for an IP connection?

Hi, If I use this command netstat | grep "1268" it shows me all IP addresses connected via port 1268, which is half of what I want. I would like to be able to then map these against a PID on the system, and also thereby get the userid. I have done a couple of days google bashing but... (3 Replies)
Discussion started by: gcraill
3 Replies

8. UNIX for Dummies Questions & Answers

2 ftps in script, second won't go to output file

I'm running this on both solaris and hp boxes, ftping from windows, then ftping to an aix machine. If I run the ftpReportFile by itself, I get info in the ftp_rpt_log. If I run just the 2 ftps together, I also get output. However, if I run the entire shell script, I don't get output from... (4 Replies)
Discussion started by: brdholman
4 Replies

9. Shell Programming and Scripting

Help needed in shell script for FTPS

Hi, Im trying to build a script to download files from a secure FTP site. When I run the command ftps <host_address> in the unix prompt, it asks username and password, and then prompts the following question. Do you want to trust this certificate? (y): From the prompt, I am able to type... (10 Replies)
Discussion started by: vidhya_vec
10 Replies

10. Shell Programming and Scripting

Testing ssh connection from KSH script

Hi. I have a kornshell script that runs on a daily basis as a cron job. Part of what the script does is copy the folder contents from another server to the current server (server where KSH script is running). I have a scp command, as follows: scp $REMOTE_HOST:$REMOTE_FILE_DIR/* $TMP_DIR ... (8 Replies)
Discussion started by: dmilks
8 Replies
Login or Register to Ask a Question