Re: Check return value of scp

From: all mail refused (elvis_at_notatla.org.uk)
Date: 01/30/05


Date: 30 Jan 2005 19:55:59 GMT

In article <MPG.1c66cd29d71b2caf989698@news.t-online.de>, h.wulff wrote:

>if ( ! scp <options> )
>then

>But unfortunately it returns everything ok when the connection fails and

>How can I check whether the connection was established and all the data
>were successful copied?

I suggest not using scp (nor sftp). If you do
    ssh foo@bar some/xfer_script
you can get what you want. You can arrange a script
to do file transfer and return meaningful results in
a simple text protocol between the 2 ends.

-- 
Elvis Notargiacomo  master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/
    Elections must be close.  Simon Hughes MP (LibDem) (well, an assistant)
    has replied to my letter from 9 months ago.


Relevant Pages

  • RE: sftp exit codes?
    ... thanks to everyone who replied with a tip or suggestion. ... Subject: sftp exit codes? ... I am using scp along with BatchMode on command line. ...
    (SSH)
  • Re: Does OpenSSH use RCP?
    ... > with someone about the difference between OpenSSH and SFTP. ... > SFTP) than SCP will fail. ... OpenSSH uses an implementation that is compatible to the original SSH ...
    (comp.security.unix)
  • Re: SFTP and SCP
    ... > Both scp and sftp use insecure protocols which derive their security from ... In what way do you see sftp as having "improved ... with wildcard expansion. ... matching rules chosen by the server. ...
    (comp.security.ssh)
  • Re: Howto deny a sftp connection
    ... > but that they cannot transfer files from that server. ... If you're allowing shell access then it's basically impossible to stop ... > Thats why I want to stop and deny all sftp and scp connections. ... the sftp subsystem is easily to stop by editing the sshd_config. ...
    (comp.security.ssh)
  • Re: FTP Encryption
    ... SSH as a transport in different ways, ... OpenSSH's sftp certainly doesn't use scp in any way. ... operating systems system files. ...
    (comp.security.ssh)