Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Secure Copy

Status
Not open for further replies.

Muskaan

Programmer
Oct 21, 2002
47
US
Hi All,
I am working on file transfer between two machines. Since the files contain highly user-sensitive information, i am using secure copy.

I have the following questions about scp:
1. Unlike FTP, scp does not have a timeout parameter. Does this mean that scp will never hang even in case of network issues ?
2. Is there need to perform checksum (using md5 or something like that) after scp to ensure all files have gone through correctly ?
3. What is the best way to perform checksum ?

Thanks in advance for all the help!
Muskaan
 
> 1. Unlike FTP, scp does not have a timeout parameter.
man ssh_config
Code:
     KeepAlive
             Specifies whether the system should send TCP keepalive messages
             to the other side.  If they are sent, death of the connection or
             crash of one of the machines will be properly noticed.  However,
             this means that connections will die if the route is down tem‐
             porarily, and some people find it annoying.

             The default is “yes” (to send keepalives), and the client will
             notice if the network goes down or the remote host dies.  This is
             important in scripts, and many users want it too.

             To disable keepalives, the value should be set to “no”.

man scp
Code:
DIAGNOSTICS
     scp exits with 0 on success or >0 if an error occurred.
I would think that if keep-alives are being sent, that scp will return a non-zero exit status should the link fail.

There is also a sftp command (well I have one on this Linux Red Hat box)

> 2. Is there need to perform checksum
Probably not - the lower level protocols do quite a lot of work to ensure a reliable connection. But MD5 would be a useful tool.

> 3. What is the best way to perform checksum ?
Code:
# do this on the local machine
md5sum hello* > tmp

# now copy tmp to the remote machine

# do this on the remote machine
md5sum --check tmp
If all is well, you should see something like this
Code:
hello.c: OK
hello.txt: OK
 
Thanks for your response Salem, very much! I do not have md5/md5sum on my machine. I was thinking I could download it from some site. I have come across two versions for Windows, but nothing for Sun Solaris. Do you know of some site where I could download md5sum from ?
Thanks,
Muskaan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top