ssh_exchange_identification error when using sftp

From: Turner, Carl H [NTK] (
Date: 01/26/04

  • Next message: "password file syncing"
    Date: Mon, 26 Jan 2004 12:20:44 -0600
    To: <>

    Hey all, I'm having issues with sftp...

    Platform A: HPUX 11.11, OpenSSH_3.7.1p1
    Platform B: LINUX 2.4.20-18 (Redhat bigmem), OpenSSH_3.6.1p2 (yes I know... needs upgrade)

    Pub. and priv. keys are setup.

    This 'sftp' command is being executed from a /bin/sh script. No fancy while/for loops around the 'sftp'. Not an expect script, etc...
    Section of script where the 'sftp' command is executed:

    sftp username@hostname >> ./sftp.log <<-EOF 2>> ./total.log
    put /path/to/source/file /path/to/destination/file
    There's no real good info in any syslog files. Just "authentication failure" entries.
    The only thing I could think of that is messing this up is the put command giving a filename for the destination vs. just a directory path. i.e. 'put /file /' vs. 'put /file /file'. I still say sftp isn't the best choice for automation processes such as this...
    Any one experiencing the same/similar things?

  • Next message: "password file syncing"

    Relevant Pages

    • Problem with LS command
      ... I have batch files setup to move data to and from a server using SFTP. ... My batch files run the SFTP command and use a script (sftp [-b ...
    • [HPADM] [SUMMARY] RE: SFTP Scripting
      ... We are trying to set up an SFTP environment with a partner. ... need to now is to script it so it is non-interactive. ... Echo "Ending of test sftp script ... ...
    • Re: Ssh and sftp via here document
      ... The file transfer is performed by sftp during an ssh ... session in which the user running the script temporarily becomes ... can be done without storing cleartext passwords in the script. ...
    • Re: sftp in script
      ... sftp abc123@xxxxxxxxx ... How come the script does not run? ... It does not trigger the mput * command. ... Use the "-b" option to sftp and make a batchfile with the commands you ...
    • Re: sftp exit codes?
      ... I am using scp along with BatchMode on command line. ... better choice over sftp. ... of exit codes for the sftp program and what each one ... I'm actually porting a shell script that use to use ...