03-26-2013
The binary ftp always returns 0 as itself has no functional errors. For errors regarding the file transfer, there are other codes, which can't be accessed via $?. They can only be parsed as text output from ftp.
Can you use something else like scp? That might make it much easier as you can use $? again and would be encrypted ie. safer. It would need an exchange of a key though because it works password-less when being used non-interactive.
If there is no way of key exchange for authentication, you could still feed it with expect for example.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am transferring files from our local server to remote server using FTP command in a shell script.
I am using a the following code,
FTPFILE="ercchk*.txt"
mput $FTPFILE
can any one help me out in calucalating the number of files transfered.
help in this regard is highly... (9 Replies)
Discussion started by: azazalis
9 Replies
2. UNIX for Advanced & Expert Users
Hi,
We have some clients who will place huge files in to one of the remote server.
And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients.
My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies
3. Shell Programming and Scripting
I am trying to code a ksh script that will check to see if all 26 incoming ftp files have been received before proceeding to the next function, which is to rename each file.
Here is the pseudo-code of what I am trying to do:
<<STEP_1>>
IF all ALS files have been transmitted then... (2 Replies)
Discussion started by: doug145
2 Replies
4. UNIX for Dummies Questions & Answers
i need to know how files can be transfered from one system to another securely in linux. (9 Replies)
Discussion started by: bibing
9 Replies
5. UNIX Desktop Questions & Answers
1)I need to write a script which ftps 3 files to a unix box,
2)once the files are ftped i need to check the number of rows in each file and compare it with the data (no of rows) coming in a manifest file, if the number of rows in each file matches the data coming in manifest file, then i need to... (3 Replies)
Discussion started by: imran_affu
3 Replies
6. Shell Programming and Scripting
Validating the size of file transferred from ftp server to the local system.
File type: Text file/Flat file
Source System: Windows / Unix Systems
Target System is always: Unix
Mode of Transfer : ASCII
We have generic ftp shell script that transfers the files from different ftp servers. ... (2 Replies)
Discussion started by: jpundalik
2 Replies
7. Solaris
We have umask defined under /etc/.login as 022.
I have my user specific umask defined in /userhome/.login as 002.
I understand ftp will not execute anything at destination, it simply transfers files.
But it seem to be using 022 as umask for the files transferred. How does ftp knows what umask... (4 Replies)
Discussion started by: kchinnam
4 Replies
8. Shell Programming and Scripting
We are transferring xml files to remote machine through cronjob @every 5 mins and then will move the files to the backup folder is source server.
Sometimes the file is transferred as 0kb to destination server, whereas the file in the source backup folder is completely written.
There is no error... (6 Replies)
Discussion started by: Bhavi
6 Replies
9. UNIX for Beginners Questions & Answers
I've a folder in remote server and it has 50 files. I like to transfer these files by first 10 and next 10 files.
I'm using mget command to transfer the files. How to limit the file transfer limit to 10. instead of copying 50 files at a time.
Thanks
Janarthan (5 Replies)
Discussion started by: Janarthan
5 Replies
10. UNIX for Beginners Questions & Answers
how to check if any files are being FTP'ed currently ? both FTP in and FTP out. And is there any system log for all the FTP activities ? (2 Replies)
Discussion started by: i4ismail
2 Replies
LEARN ABOUT DEBIAN
vde_cryptcab
VDE_CRYPTCAB(1) General Commands Manual VDE_CRYPTCAB(1)
NAME
vde_cryptcab - Virtual Distributed Ethernet encrypted cable manager
SYNOPSIS
vde_cryptcab [ -p portnum ] [ -s socketpath ] [ -c [remote_user@]host[:remote_portnum] ] [ -P pre_shared.key ]| [ -x ] [ -v [v][v][v] ] [
-k ] [ -d ]
DESCRIPTION
A vde_cryptcab is a distributed cable manager for VDE switches. It allows two VDE switches on two machines to communicate using a blowfish
encrypted channel.
When used in client mode (i.e., with -c option), it generates a random blowfish key, and uses scp (1) to transfer the key to the remote
server.
On the client side, the environment variable SCP_EXTRA_OPTIONS may be set in order to append options to the scp command line (this is use-
ful for example when dropbear or another non-standard ssh client is used to transfer the blowfish key).
After a 4-way handshake phase to verify client credentials, server and client will exchange VDE datagrams encapsulating them into crypto-
grams that are sent via udp to each remote host.
On server side, one could run:
vde_cryptcab -s /tmp/vde2.ctl -p 2100
To start a multi-peer cryptcab server, accepting udp datagrams on port 2100, that connects each authenticated remote client to a different
port of the switch. In fact, a new instance of vde_plug (1) is started and connected to the switch through local unix socket.
The command
vde_cryptcab -s /tmp/vde2.ctl -c foo@remote.machine.org:2100
will connect a client to the remote server, running on udp port 2100. At this point, on server side a verify for user "foo" credentials is
required, typically it could be: host-based authentication, password challenge or public key authentication. See ssh (1) for more details
about it.
If the two vde_switches run as daemon and they are connected to tap interfaces a level 2 encrypted tunnel is established.
OPTIONS
-p portnum
It is possible to decide which local udp port to use. When this option is not specified, cryptcab will use default udp port number,
7667.
-c [remote_user@]host[:remote_portnum]
run vde_cryptcab in client mode, trying to connect to host . Both remote_user and remote_portnum parameters are not required. If
not specified, the same user running vde_cryptcab is used for authentication on server, and default udp port 7667 is used.
-s socketpath
specify the UNIX socket to be used by local programs for joining the VDE. The default value is "/tmp/vde.ctl".
-P pre_shared.keypath
if specified, vde_cryptcab will run in pre-shared key mode, instead of generating a random key to transmit with ssh. Given option
is the path to the pre-shared symmetric key file to use for data encryption. The same key has to be used on both client and server.
-x Disable symmetric key encryption.
-k Send periodic "keepalive" packets to avoid server timeouts. Useful when you want to keep a low-traffic link available.
-d Run as daemon.
-v Verbose. (Use -vv -vvv or -vvvv for more verbosity)
KNOWN ISSUES
Encapsulating IP packets into session+udp layer results in real datagrams larger than tap device mtu. Since vde_cryptcab gets confused by
packet fragmentation, the tap device mtu must be set to a smaller value than real interface mtu. Use ip(8) or ifconfig(8) to set up your
tap device mtu.
Explicitly disabling encryption leads to obvious security problems. It is advised to avoid unencrypted mode (-x) in non-controlled net-
works.
NOTICE
Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik"
i.e. the German "Association for Electrical, Electronic & Information Technologies").
SEE ALSO
vde_switch(1), vdeq(1), vde_plug(1), vde_plug2tap(1), scp(1), ssh(1).
AUTHORS
VDE is a project by Renzo Davoli <renzo@cs.unibo.it>.
vde_cryptcab is a VDE component by Daniele Lacamera <root@danielinux.net>
Virtual Distributed Ethernet December 6, 2006 VDE_CRYPTCAB(1)