06-25-2012
#!/bin/sh
file1=user1@domain2.com:/path/file1.txt (completePath to file1.txt)
file2=user1@domain2.com:/path/file2.txt (completePath to file2.txt)
files=( ${file1} ${file2} )
scp ${files[@]} /home/path to save files
echo done copying
I am running this script from
user1@domain1.com. I could copy files succesfully but typing the password two times using putty . if there are 10 files , i have to type password 10 times using this script.
10 More Discussions You Might Find Interesting
1. AIX
Hi,
I am a newbie to AIX. We have 2 AIX5.3 servers in our environment, I need to transfer some files in Binary mode from one server to another and some files in ASCII mode from one server to another server. Could you please help me as to how I need to do that?
Thanks,
Rakesh (4 Replies)
Discussion started by: rakeshc.apps
4 Replies
2. Shell Programming and Scripting
Hi,
I want to transfer html files from windows server to unix server. Those files also have to be assigned proper permissions. Can u people suggest any ideas for this scenario?
Regards,
http://www.unix.com/images/smilies/thumb.gifSanthosh (1 Reply)
Discussion started by: Santhosh_Ind
1 Replies
3. Shell Programming and Scripting
Hi
When I m transferring my file to UNIX server using filezilla , after every line in a file ^M is shown.
Because of this ^M I cannot execute my file/scripts
Why so ???
Any suggestions... (7 Replies)
Discussion started by: dashing201
7 Replies
4. Shell Programming and Scripting
Hi All,
I have to establish as connectivity from Unix server(Solaris) to Windows machine and transfer files.
We use public key Private key pair to authenticate from Unix to Unix connectivity to transfer the file.
How to establish the sFTP connection from Unix to Windows and transfer the... (1 Reply)
Discussion started by: koti_rama
1 Replies
5. Shell Programming and Scripting
We would be migrating unix solaries to Linux redhat.
Basically source is unix and target is linux.
i would like to copy entire file system unix/source/* to target linux/souce/*
but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Discussion started by: balajikalai
8 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Is there a way to transfer a file from one unix server from another without entering the login credentials. I know scp and other commands but it prompts the username/password.
However in my script i have a file, who i need to send to another unix server where the content of that file will... (4 Replies)
Discussion started by: gopajitmalakar
4 Replies
7. Shell Programming and Scripting
Hi Guys,
I have to transfer a few files in my system . The commands to be used are as follows . Will it be possible to send the output of the following in the form of a mail .
cd /export/home/teja
ls -lrt Quote.java*
mv Quote.java Quote.java.20121023
cp /tmp/Quote.java .
ls -lrt... (2 Replies)
Discussion started by: Ravi_Teja
2 Replies
8. Shell Programming and Scripting
Hi folks,
Is it possible to create 10GB file in linux and transferring the file to other remote server?
Regards,
J (3 Replies)
Discussion started by: scriptscript
3 Replies
9. Shell Programming and Scripting
Hi All,
I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers.
So i am looking for a script to transfer the file automatically from Linux server to Windows server?
Please advise.
Thanks... (3 Replies)
Discussion started by: arunmanas
3 Replies
10. Shell Programming and Scripting
I have a large number of files with file names of the format
iv.epoz.hhe.d.2018.028.000000.sac
iv.epoz.hhn.d.2018.028.000000.sac
iv.epoz.hhz.d.2018.028.000000.sac
iv.epoz.hhe.d.2018.029.000000.sac
iv.epoz.hhn.d.2018.029.000000.sac
iv.epoz.hhz.d.2018.029.000000.sac... (4 Replies)
Discussion started by: kristinu
4 Replies
ftpd(8c) ftpd(8c)
Name
ftpd - DARPA Internet File Transfer Protocol server
Syntax
/usr/etc/ftpd [ -d ] [ -l ] [ -ttimeout ]
Description
The server is the DARPA Internet File Transfer Protocol server process. The server uses the TCP protocol and is invoked by when it
receives a connection on the port specified in the service specification. For further information, see
The server currently supports the following requests. Case is not distinguished.
Request Description
ABOR Abort previous command
ACCT Specify account
ALLO Allocate storage
APPE Append to a file
CDUP Change to parent of current working directory
CWD Change working directory
DELE Delete a file
HELP Give help information
LIST Give list of files in a directory (ls -lg)
MKD Make a directory
MODE Specify data transfer mode
NLST Give name list of files in directory (ls)
NOOP Do nothing
PASS Specify password
PASV Prepare for server-to-server transfer
PORT Specify data connection port
PWD Print the current working directory
QUIT Terminate session
RETR Retrieve a file
RMD Remove a directory
RNFR Specify rename-from file name
RNTO Specify rename-to file name
STOR Store a file
STOU Store a file with a unique name
STRU Specify data transfer structure
TYPE Specify data transfer type
USER Specify user name
XCUP Change to parent of current working directory
XCWD Change working directory
XMKD Make a directory
XPWD Print the current working directory
XRMD Remove a directory
The remaining requests specified in Internet RFC 959 are recognized, but not implemented.
The server interprets file names according to the globbing conventions used by This allows users to utilize the metacharacters *?[]{}~.
The server authenticates users according to three rules:
1. The user name must be in the password database, and not have a null password. In this case a password must be provided by the client
before any file operations may be performed.
2. The user name must not appear in the file
3. If the user name is anonymous or an anonymous account must be present in the password file (user ftp). In this case the user is
allowed to log in by specifying any password (by convention this is given as the client host's name).
In the last case, takes special measures to restrict the client's access privileges. The server performs a command to the home directory
of the user. To prevent system security from being breached, it is recommended that the subtree be constructed with care. Thus the follow-
ing rules are recommended:
~ftp) Make the home directory owned by and unwritable by anyone.
~ftp/bin) Make this directory owned by the superuser and unwritable by anyone. The program must be present to support the list commands.
This program should have mode 111.
~ftp/etc) Make this directory owned by the superuser and unwritable by anyone. The files and must be present for the command to work prop-
erly. These files should be mode 444.
~ftp/pub) Make this directory mode 777 and owned by Place the files, which are to be accessible by the anonymous account, in this direc-
tory.
Options
-d Enables certain debugging messages that are printed by ftpd.
-l Logs each ftp session to the
-t Sends the inactivity timeout period to timeout; otherwise, the server will timeout an inactive session after 15 minutes.
Restrictions
Support does not exist for aborting commands.
The use of an anonymous account is inherently dangerous and should be avoided when possible.
The server must run as the superuser to create sockets with privileged port numbers. The server maintains an effective user id of the
logged in user, reverting to the superuser only when binding addresses to sockets. The possible security holes have been extensively scru-
tinized, but are possibly incomplete.
Files
Contains the list of unauthorized users
See Also
ftp(1c), services(5), inetd(8c), syslog(8)
ftpd(8c)