11-02-2001
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 password. Similarly is it possible to do that for telnet? Will be grateful if someone can help me. Thanks and regards
Asutosh
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys,
Here is my requirement for ftp script that i have to automate in unix using shell script:
1) Find the files that atre created one week from the present day.
2) ftp them to the backup server.
3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies
2. UNIX Desktop Questions & Answers
Hi guys,
Here is my requirement for ftp script that i have to automate in unix using shell script:
1) Find the files that atre created one week from the present day.
2) ftp them to the backup server.
3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies
3. Filesystems, Disks and Memory
Hi guys,
Here is my requirement for ftp script that i have to automate in unix using shell script:
1) Find the files that atre created one week from the present day.
2) ftp them to the backup server.
3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies
4. Cybersecurity
Hi All,
I am a newbie to unix and scripting. I need to do the following job:
1. Create a batch file in windows that will call a script in a remote unix box.
2. The script now ftp files from the Remote windows machine and get them back to the local windows.
Actually, I have written the script... (3 Replies)
Discussion started by: Ankur
3 Replies
5. UNIX for Advanced & Expert Users
Hi,
I am working in Unix and Teradata fastload. I need to automate file transfer through ftp from windows path to Unix directory at a specific time, then I should call fastload scripts execution. I have got the fastload script. Entire process should be automated without any manual intervention. It... (1 Reply)
Discussion started by: SATYAPRIYA_D
1 Replies
6. Shell Programming and Scripting
ftp automation code is
ftp -v -n -i $host_name << EOF
user $u_name $u_pass
bi
mput $tar_file
bye
EOF
How to check whether the file is successfully transfered or not. Suppose the user name or password is provided wrongly then the code should track the error and ask the end user to enter... (2 Replies)
Discussion started by: Dip
2 Replies
7. Shell Programming and Scripting
Hi,
I have got a requirement like this.
a parameterized function custFtp which will take 5 i/ps and will do the following tasks.
p1) server name
p2) username
p3) password
p4) path name of the server where the file resides
p5) file name pattern
the function will work like this.
... (1 Reply)
Discussion started by: ani_datta
1 Replies
8. AIX
Here is my requirement to automate the deployment procedure for my project.
Telnet to AIX box (say SERVER1) from windows machine (with USER1)
Select the server to login say "SERVER2"
su as different user say "USER2"(Owner of the deployed files)
Execute the script (Script has so many... (1 Reply)
Discussion started by: nurainos
1 Replies
9. Shell Programming and Scripting
Hi,
i am trying to automate an ftp script which is as below.But my user id has special characters(aaa\$ifg). So it is not working correctly.Can anyone help on this?I tried providing both of them in double & singe quoted. But somehow it is not picking the "\". Also tried keeping \ before the... (3 Replies)
Discussion started by: aeroticman
3 Replies
10. Shell Programming and Scripting
Dear experts, please help me .
I've found simple EXPECT scripts and all works fine. But I need more automation in error handling and sending list of commands/output logging from multiple remote hosts.
I have 10 hosts, for example:
host1 192.168.1.1 LOGIN1 PASSWORD1
...... ... (2 Replies)
Discussion started by: starchen
2 Replies
netrc(4) File Formats netrc(4)
NAME
netrc - file for ftp remote login data
DESCRIPTION
The .netrc file contains data for logging in to a remote host over the network for file transfers by ftp(1). This file resides in the
user's home directory on the machine initiating the file transfer. Its permissions should be set to disallow read access by group and oth-
ers (see chmod(1)).
The following tokens are recognized; they may be separated by SPACE, TAB, or NEWLINE characters:
machine name Identify a remote machine name. The auto-login process searches the .netrc file for a machine token that matches the remote
machine specified on the ftp command line or as an open command argument. Once a match is made, the subsequent .netrc
tokens are processed, stopping when the EOF is reached or another machine token is encountered.
default Same as machine name, except that default matches any name. There can be only one default token, and it must be after all
machine tokens. The default token is normally used as follows:
default login anonymous password user@site
Such an entry gives the user automatic anonymous ftp login to machines not specified in .netrc.
login name Identify a user on the remote machine. If this token is present, the auto-login process will initiate a login using the
specified name.
password string Supply a password. If this token is present, the auto-login process will supply the specified string if the remote server
requires a password as part of the login process. Note: if this token is present in the .netrc file, ftp will abort the
auto-login process if the .netrc is readable by anyone besides the user.
account string Supply an additional account password. If this token is present, the auto-login process supplies the specified string if
the remote server requires an additional account password. If the remote server does not require an additional account
password, the auto-login process will initiate an ACCT command.
macdef name Define a macro. This token functions the same as ftp macdef. A macro is defined with the specified name; its contents
begin with the next .netrc line and continue until a null line (consecutive NEWLINE characters) is encountered. If a macro
named init is defined, it is automatically executed as the last step in the auto-login process.
EXAMPLES
Example 1: A Sample .netrc File
A .netrc file containing the following line:
machine ray login demo password mypassword
allows an autologin to the machine ray using the login name demo with password mypassword.
FILES
~/.netrc
SEE ALSO
chmod(1), ftp(1), in.ftpd(1M)
SunOS 5.10 3 Jul 1990 netrc(4)