The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-28-2006
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,754
Code:
#!/bin/ksh
cd /path
sftp remoteuser@remotehost:/path <<EOF
mput Test.txt
bye
EOF
I'm assuming that leaving off EOF was a typo.

sftp used that way requires that authentication keys be set up on the remote host.
What local user is authenticated to remoteuser on the remotehost? And is the script running as that user, ie., do you su to the required local user?