Wow, those are some serious restrictions! So create a batchfile for the sftp comamnds you need to run and then try running sftp like so: 'echo "$password" | <:sftp_command>' and see if you can get away with it. Messy, ugly kludge for a messy, ugly situation.