Automating telnet and ftp


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automating telnet and ftp
# 1  
Old 04-25-2006
Automating telnet and ftp

Hi,

I want to automate FTP. I have a fair idea that this can be done using expect scripting. But I dont how to do it. Please, can anyone give me an example of how to do it in Unix.

Thanks in advance
# 2  
Old 04-25-2006
# 3  
Old 04-25-2006
hi,
I have this script:
spawn ftp 135.112.22.15
expect "Name"
send "anonymous\r"
expect "Password:"
send "nobody@nowhere.com\r"
interact

Now interact connects the keyboard. If there is file in a directory known as /mani/mani1 and file name is mani1.txt. I want get this file to my machine without connecting to keyboard. That is, I want the script to get the file directly. how can I do it.

Thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Automating the FTP get

Hi , I want to pull files from ftp monthly once . The files in ftp has a something like 292_fileto_pull and next month it will be 293_fileto_pull for each month the number keeps increasing. i thought in my script if i can use date and increment the number by it mget *_292_fileto_pull i... (2 Replies)
Discussion started by: vikatakavi
2 Replies

2. UNIX for Dummies Questions & Answers

Automating ftp job using implicit ssl?

Can this be done? Or do you need some other program installed on the AIX box? (6 Replies)
Discussion started by: NycUnxer
6 Replies

3. Shell Programming and Scripting

Automating telnet checking for success/failure

Hi I wanna automate the telnet process for port connection.. # telnet 0 port_number Trying 0.0.0.0... Connected to 0. Escape character is '^]'. If its connected how to make it disconnect automatically.. And how to check for success or failure.. (0 Replies)
Discussion started by: ningy
0 Replies

4. Shell Programming and Scripting

Automating mailing via telnet to smtp

Hi, I am trying to write a ksh script to send an attachment via telnet to an SMTP server. I'm using MKS Toolkit. mail, mailx, sendmail, nc are not working on the server where I have MKS Toolkit installed. If I type the following from the command prompt I receive an email: telnet x.com... (0 Replies)
Discussion started by: dukeEarth
0 Replies

5. Shell Programming and Scripting

Automating ftp without .netrc

I'm writing a script which needs to run under an 'automation' account and there is already a .netrc machine definition for the server I need to connect to. If I create a new machine entry in the .netrc with a different account this will, of course, be ignored and the ftp session will connect to... (3 Replies)
Discussion started by: DeepakS
3 Replies

6. UNIX for Advanced & Expert Users

displaying error while automating ftp

#!/bin/sh HOST=HOST_IP USER=$USER PASSWD=$PASSWD FILE="*.htm" ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD get $FILE quit END_SCRIPT exit 0 Is there any way to display appropriate error message if the file is not found on the server...... (2 Replies)
Discussion started by: bishweshwar
2 Replies

7. Cybersecurity

One accout for FTP other to TELNET

Hi All, If I want to have two user accounts from the same grop in UNIX Solaries. However, I want one of them to be used only for FTP while the other for TELNET. Can anybody tell me how to do that? Best Regards (13 Replies)
Discussion started by: omran
13 Replies

8. IP Networking

FTP or Telnet

Dumb question I'm sure but how on earth do I transfer files from a sco unix machine to my windows 2000 machine. I'm typing commands on my Win2000 machine. All I can seem to do is move files around on the unix system? (8 Replies)
Discussion started by: Timbash
8 Replies

9. UNIX for Dummies Questions & Answers

Automation of telnet and ftp

I have a basic query. I use telnet and ftp very frequently. I want to do it without spending time in typing username and password everytime. I know that if I have .netrc file which contains server address, username, pasword, then just typing ftp will conect to that server with that username and... (10 Replies)
Discussion started by: asutoshch
10 Replies
Login or Register to Ask a Question