Computing.Net > Forums > Unix > telnet & ftp through shell script?!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

telnet & ftp through shell script?!

Reply to Message Icon

Name: nariman azad
Date: April 13, 2003 at 04:00:27 Pacific
OS: UnixWare7.1.1
CPU/Ram: PII/128MB
Comment:

Can i do TELNET and FTP to the remote machine with automatic login and password through shell script ?
if yes,how??

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: April 13, 2003 at 06:50:45 Pacific
Reply:

ftp can be scripted pretty easily if you want only limited funtionality. Telnet as a chatty protocol is not so easy with a normal shell. Look at expect. This and more can be done easily with expect.


0

Response Number 2
Name: WilliamRobertson
Date: April 13, 2003 at 11:28:56 Pacific
Reply:

Typically to script ftp you create a .netrc file in your home directory, owned by you, not visible to others, containing e.g:

machine somehost login someuser password somepassword

Then "ftp somehost" automatically logs you in using user/password. You could use this with a "here document" e.g:

ftp somehost <<-ENDFTP
ls
bye
ENDFTP


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: telnet & ftp through shell script?!

telnet through shell script www.computing.net/answers/unix/telnet-through-shell-script/4447.html

telnet through shell script www.computing.net/answers/unix/telnet-through-shell-script/4980.html

Ftp thru shell script www.computing.net/answers/unix/ftp-thru-shell-script/2313.html