j*******r 发帖数: 201 | 1 Here is my .netrc ( username: yang pwd:yangpwd)
"machine 128.10.1.5 login yang password yangpwd"
The problem is when I run ftp 128.10.1.5, it said
Error - .netrc file not correct mode.
Remove password or correct mode.
Can any daxia tell me how to fix this?
Thanks. |
|
w*****n 发帖数: 94 | 2 make .netrc only readable and writable by yourself.
chmod 600 .netrc |
|
a*****i 发帖数: 4391 | 3 man netrc
It is not secure at all though.
Better to use ssh/sftp, |
|
|
c*****t 发帖数: 1879 | 5 1. like others have suggested, read man pages of them first.
the commands you discribed can do the job. Just a note
that you can use shell script to generate a ftp script
in .netrc (which you may have to create a special account for it)..
Or you can use expect script. Or you can tar the files
first if they are not too big.
2. you may also want to try out uucp, which I have no idea
of using.
3. You can do NFS mount and. |
|
l*l 发帖数: 225 | 6 you should using .netrc to config your account. Then:
{
bin
put sth
..
..
} | ftp host |
|
m******n 发帖数: 497 | 7 in your script
ftp -n host <
user username password
#bin
#prompt
#hash
#getting files
bye
EOF
or you can put them in the $HOME/.netrc as mention above |
|
w*****n 发帖数: 94 | 8 the ftp program always tries to get username and password from tty,
instead of stdin which can be redirected. the solutions are:
1) put username and password in $HOME/.netrc file, or
2) use expect |
|
A***e 发帖数: 130 | 9 man netrc
for non-interactive ftp
man nohup
for continuing after logout. |
|