Search: Home Bugtraq Vulnerabilities Mailing Lists Jobs Tools Vista
Secure Shell
sftp exit codes? Apr 28 2008 09:58PM
Bond Masuda (bond masuda jlbond com) (2 replies)
Re: sftp exit codes? Apr 29 2008 06:39AM
Sharad (sharad2011 yahoo com) (1 replies)
Hello Bond,

I am not certain how you will handle sftp - which
happens to be interactive by nature; in a shell
script.

I am using scp along with BatchMode on command line.
This will not prompt for password. If authentication
is configured to work without password, the scp will
do it's job. If scp fails for any reason, like keys
not established, then you can capture the return code
and do necessary action.

Regards,
Sharad
p.s. - this is not a direct answer to your query but
another option to explore. I think scp will be a
better choice over sftp.
--- Bond Masuda <bond.masuda (at) jlbond (dot) com [email concealed]> wrote:

> Hi,
>
> I recently had to do some scripting around OpenSSH's
> version of sftp and
> noticed that the exit codes don't seem to be
> documented anywhere (of course,
> outside the source code that is). Does anyone know
> where I can find a list
> of exit codes for the sftp program and what each one
> means?
>
> I'm actually porting a shell script that use to use
> SSH Communications's
> version of sftp2, which has a list of documented
> exit codes and the script
> handles the exit codes based on their meaning. By
> trial and error, I've
> figured out that OpenSSH's sftp returns '1' for the
> situation I was fixing,
> but I want to make sure it handles all
> conditions/exit codes appropriately.
>
> Any pointers to information would be appreciated
> (documentation or specific
> source file or ?). Thanks!
> -Bond
>
>
>

________________________________________________________________________
____________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

[ reply ]
RE: sftp exit codes? Apr 29 2008 05:01PM
Bond Masuda (bond masuda jlbond com)
Re: sftp exit codes? Apr 29 2008 12:57AM
Jeremy C. Reed (reed reedmedia net)







 

Privacy Statement
Copyright 2007, SecurityFocus