SFTP client script broken after OpenSSH 2.5.1p1 to 2.5.2p2-1

mouring at etoh.eviladmin.org mouring at etoh.eviladmin.org
Sat Apr 7 02:23:16 EST 2001


Hmm.. I can't mimic this under the current CVS version.

sftp localhost <<EOF
cd /tmp
ls
EOF

works fine over here.. When I was testing 2.5.2 w/ the new -b batchfile
mode I was very careful not to break that feature.

Can you try something for me and put a blank line before the 'cd $PDIR'?

- Ben


On Fri, 6 Apr 2001, Davis, Ricardo C. wrote:

> Hello friends,
>
> I have a script that uses the sftp client to transfer a file to another
> server using PK authentication.  It was working until I upgraded from
> OpenSSH 2.5.1p1 to 2.5.2p2-1 yesterday (on a RH Linux 6.2 system).  The sftp
> command is:
>
> sftp -o "IdentityFile ~/.ssh/id_dsa" \
>    $PUSERNAME@$PSERVER >$TEMPFILE 2>&1 <<-!
> 	cd $PDIR
> 	put $DOC_ARCHIVE
> 	ls
> 	quit
> 	!
>
> Now when I run the script in test mode where it logs into an account on the
> same box the script appears to ignore the current directory set by the "cd"
> command and will "put" the file in the home directory of PUSERNAME.  I
> checked to make sure $PDIR was set and it is ... because when I do the "ls"
> in sftp it lists the other files already present in the target subdirectory.
> When I do a "set -x" before this command, here's what happens:
>
> sftp> sftp> Uploading fci0406a.zip to fci0406a.zip
> sftp> drwxrwxr-x    2 pusernam pusernam     4096 Mar 26 15:58 .
> drwxr-x---    5 pusernam acctAdm      4096 Apr  6 11:30 ..
> -rw-r--r--    1 pusernam pusernam    76280 Mar 23 17:20 fci0323a.zip
> -rw-r--r--    1 pusernam pusernam    38151 Mar 23 17:20 fcd0323a.zip
> -rw-r--r--    1 pusernam pusernam    38151 Mar 23 17:20 fcp0323a.zip
> -rw-r--r--    1 pusernam pusernam    76280 Mar 26 17:39 fci0326a.zip
> -rw-r--r--    1 pusernam pusernam    38151 Mar 26 17:39 fcd0326a.zip
> -rw-r--r--    1 pusernam pusernam    38151 Mar 26 17:39 fcp0326a.zip
>
> When I check out the home directory of this account I find the file was
> transferred there.
>
> Has this problem been identified (I didn't see it on the errata page) and
> fixed?  How long before the next release with the fix?
>
>
> -Ricardo
> ...going back to 2.5.1p1 :(
>
> --------------------------------------------------------------------
>                     Intermedia Communications
> Ricardo Davis                                ABN-Information Systems
> rcdavis at intermedia.com       http://www.intermedia.com/products/abn/
> --------------------------------------------------------------------
>





More information about the openssh-unix-dev mailing list