10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I got an issue in .netrc , please find below SFTP script and .netrc file .
getting error as below, please assist me to rectify, thanks.
sftp> $ imuploaddata test1.DAT /home/test/
Invalid command.
FTP scripts
abc@systalk:~/test> cat imftp.sh
#!/bin/sh
filetoftp="$1"
filepath="$2"... (4 Replies)
Discussion started by: Riverstone
4 Replies
2. UNIX for Dummies Questions & Answers
OS version : RHEL 6.5
Below is an excerpt from /etc/security/limits.conf file for OS User named appusr in our server
appusr soft nproc 2047
appusr hard nproc 16384
What will happen if appusr has already spawned 2047 processes and wants to spawn 2048th process ?
I just want to know... (3 Replies)
Discussion started by: kraljic
3 Replies
3. Shell Programming and Scripting
Am trying a shell script for ftp process on Solaris
I am trying to mget files to
Destination server: myserverxxx1
folder : /backup/dumps/SERVER-1backup/afterbatch
From
Source server: SERVER-1
folder : /dumps/daily/backupafterbatch/Thu21Oct_04:22:37
depending on the date the... (1 Reply)
Discussion started by: sunnyboy
1 Replies
4. Red Hat
What is the proper format for configuring the netrc file for linux. On Solaris it was:
Machine <machinename> login Domain\\login password passwordname (1 Reply)
Discussion started by: soupbone38
1 Replies
5. AIX
Hello all,
I am using a .netrc to automatically access an ftp host. Here is the line I use...
machine 412.blank.com login nw\mylogin password *******
when I use this command...
ftp 412.blank.com
I get...
Connected to 412.blank.com.
220 server_7 FTP server (EMC-SNAS: 5.5.25.2)... (4 Replies)
Discussion started by: magikalpnoi
4 Replies
6. UNIX for Advanced & Expert Users
Hi friends,
Can we use the file .netrc for automating ftp from a perl script ?
and if so then how do i go about it ?
can i have a sample script for this ?
thanks in advance
Veera (6 Replies)
Discussion started by: sveera
6 Replies
7. UNIX for Dummies Questions & Answers
I had configured the .netrc file for automatic login to ftp
however i am not clear how to give the port no after the "machine" token:
as in, when i give
machine xyz.com 2121
login <usid>
password <pass>
i am getting the error Unknown .netrc keyword 2121 while giving the command ftp xyz.com... (1 Reply)
Discussion started by: jithinravi
1 Replies
8. UNIX for Dummies Questions & Answers
hello,
I am trying to write an automated script to transfer multiple files to another solaris 5.8 box. I am using the #! /bin/bash prompt and I am having trouble finding/creating the .netrc login file. I googled and the only info I got was that I should create/find it in my home directory. I went... (2 Replies)
Discussion started by: grandtheftander
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I would like to ask if the .netrc file should really be stored/placed in the /home/<userid> directory or in the home directory indicated by the uinfo command?
I am currently having problems with a .netrc file which is owned by a id which has it's home directory pointed to a... (2 Replies)
Discussion started by: edu_escandor
2 Replies
10. Shell Programming and Scripting
Hi, id like to ask a question about .netrc. Id like to have 2 entries for a particular machine, but with different ftp userid's ie
machine 172.19.8.26 login dcm password dcm
macdef job1
bin
hash
bye
machine 172.19.8.26 login ppp password ppp
macdef job2
bin
hash
bye
this code DOES... (8 Replies)
Discussion started by: hcclnoodles
8 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).
Tokens can be separated by SPACE, TAB, or NEWLINE characters. The following tokens are supported:
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 initiates an ACCT command.
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 initiates a login using the
specified name.
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.
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.
password string Supply a password. If this token is present, the auto-login process supplies the specified string if the remote server
requires a password as part of the login process. If this token is present in the .netrc file, ftp aborts the auto-login
process if the .netrc is readable by anyone besides the user.
skipsyst Skip the SYST command that is sent by default to all remote servers upon connection. The system command is what enables
the automatic use of binary mode rather than the protocol default ascii mode.
As some older servers cannot handle the ftp command, this directive is provided to allow inter-operability with these
servers.
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.11 25 Aug 2006 netrc(4)