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)
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)
On Mon, 28 Apr 2008, Bond Masuda wrote:

> 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?

Just 1 or 0.

> 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!

See sftp.c (and sftp-client.c).
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/

I don't think sftp (or even scp) do what you want.

Jeremy C. Reed

[ reply ]







 

Privacy Statement
Copyright 2007, SecurityFocus