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@xxxxxxxxxx> 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