SFTP-how to log individual sftp command error while executing shell script
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
The above code executes each sftp command written to sftpCommand.txt.
If some error occurs while executing any sftp command,how do i log which individual sftp command(inside sftpCommand.txt) generated the error.
Please advice
Hi all
Trying to run my korn shell script, I got no messages after the sftp.
The "finished" msg is not being displayed.
Any ideas?
sftp $argument <<EOF
quit
EOF
echo "finished"
Thanks in advance,
:O) (1 Reply)
Hi,
I am trying to use sftp in a ksh - Shell script, but not even a simple script like this returns not output:
sftp username@remotehost <<END
ls
END
If I do something like this:
sftp username@remotehost <<END | tee logfile
ls
END
I get this error message:
Warning: tcgetattr... (1 Reply)
HI
I need to write script to transefer files from windows server to UNIX and visa versa.... can any one enroute to the solution ........?
I am new to SFTP .. would requst you provide some helpful informaion, Basics of SFTP also appreciated
Thanks in Advance.
Madan (1 Reply)
Hi Gurus,
I've a find command that gets the list of files from a source directory where the extension is not html, xml, jsp, shtml or htaccess. The below find command runs fine from the command prompt or in a shell script. I need to eventually run it in a PERL script and am getting the... (5 Replies)
did anyone knows a script to get a latest file in a folder,,i try to get the newest file at a folder via sftp and i want to make a crontab to do this once a day,,can someone give me the script to get the latest file?? (5 Replies)
Hi,
I have script which does the sftp function. In the script in one place it able to read the password from file and other place files with below error.
warning: has much more security than supplying the password in the clear
warning: on the command line.
Failed to get password: File... (0 Replies)
Hi All,
I have done the Private - Public keys generation( and sharing) and have written a script for automating the SFTP. Need to make sure if it will work:
sftp.sh
#!/bin/bash
. config.ini
sftp $SFTP_USER@$SERVER <<EOF
cd $SFTP_RDIR
#ls -lrt | grep $SFTP_RFILE | wc -l
get... (2 Replies)
Hi All,
Scenario : How to securely FTP the text file from a particular location(in unix system) to the windows ftp server (my PL is suggesting to use SCP command to accomplish this).
Detailed description:
I have created a Oracle job and scheduled it in dbms_scheduler. The job will invoke... (3 Replies)
I am not able to capture error condition in sftp in Korn Shell
#!/bin/ksh
sftp batch@uat >abc 2>&1 << ENDFILE
cd public
put /data/WELCOME_55
ENDFILE
ret_val=$?
if ]
then
print file "copied successfully"
else
print file "NOT copied successfully"
fi
return 0
Now the... (9 Replies)
Hi
I am transferring files to SFTP Server using sftp command(below), and want to write log file of this activity. Can you please advise if i am doing wrong.
sftp -v -oIdentityFile=/home/bbm_user/bbm/private_open_ssh.ppm umf-sftp@bbm-prod-send.com <<EOF
put $local_path/*.gz $remote_path/... (3 Replies)
Discussion started by: cnrj
3 Replies
LEARN ABOUT POSIX
sftp-server
sftp-server(1M) System Administration Commands sftp-server(1M)NAME
sftp-server - SFTP server subsystem
SYNOPSIS
/usr/lib/ssh/sftp-server
DESCRIPTION
sftp-server implements the server side of the SSH File Transfer Protocol as defined in the IETF draft-ietf-secsh-filexfer.
sftp-server is a subsystem for sshd(1M) and must not be run directly. There are no options or config settings.
To enable the sftp-server subsystem for sshd add the following to /etc/ssh/sshd_config:
Subsystem sftp /usr/lib/ssh/sftp-server
See sshd_config(4) for a description of the format and contents of that file.
There is no relationship between the protocol used by sftp-server and the FTP protocol (RFC 959) provided by in.ftpd.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/usr/lib/sftp-server
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWsshdu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO sftp(1), ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), sshd_config(4), attributes(5)
To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the
Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed
location.
AUTHOR
Markus Friedl
SunOS 5.10 30 Jul 2003 sftp-server(1M)