10-25-2019
Increase the logging level of
sftp and read the errors.
What OS are you using? (this is important).
If, for example Linux:
Ref:
https://www.unix.com/man-page/linux/1/sftp/
Quote:
-v Raise logging level. This option is also passed to ssh.
Note, you can also set the logging level in
ssh_config
https://www.unix.com/man-page/linux/5/ssh_config/
Then, please look at your log files and post back any sftp session and error messages.
This is how you debug problems. First start with the log files and error messages.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)
Discussion started by: berlin_germany
2 Replies
2. Shell Programming and Scripting
Using a bash script, I need to find all files in a folder "except" the newest file. Then I need to insert the contents of one text file into all the files found. This text needs to be placed at the beginning of each file and needs a blank line between it and the current contents of the file. Then I... (5 Replies)
Discussion started by: Trapper
5 Replies
3. Shell Programming and Scripting
Hi All,
I want to rename set of files in the remote server which iam unable to do . i can rename only one file
at a time . for example
ftp $REMOTESERVER
{
rename $NAME1 $NAME2
} is working
whereas
ftp $REMOTESERVER
{
rename $NAME1*.dat $NAME2*.data
} is not working ...... (4 Replies)
Discussion started by: dineshr85
4 Replies
4. Solaris
I need to get multiple files from a windows server to a solaris server using sftp,
I tried it but only can get one file at a time ( I'm unable to use a wild card character using sftp) hoe do i do this.
any light on this is appreciated.
Ram. (3 Replies)
Discussion started by: ramky79
3 Replies
5. Shell Programming and Scripting
I need to pull down a good bit of files for another support team for an upgrade project. I have a server.list with all of the server names.
I need to do two parts:
FIRST:
I have this example, but it does not list the server name in front of each line.
#! /bin/bash
for server in $(<... (10 Replies)
Discussion started by: asnatlas
10 Replies
6. Solaris
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies
7. Shell Programming and Scripting
Hi,
In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this?
I am using #!/bin/ksh
For eg: sftp user@host <<EOF
cd /path
get *.txt
rename *.txt *.txt.done
... (7 Replies)
Discussion started by: jhilmil
7 Replies
8. Shell Programming and Scripting
I need to sftp a file ABC_sysdate.csv (File name with system date and timestamp) to a temporary directory on the remote server and once the file is copied I've to move the file from temporary directory to the main directory with the same name.
I have to generate a new file every hour and repeat... (6 Replies)
Discussion started by: srinup
6 Replies
9. Shell Programming and Scripting
Hello,
In our Data Warehouse environment, before our batch SFTP jobs kick off to pull the files from remote servers, I would like to setup a pre-sftp job that would test if all the remote servers from where the files are being pulled, are up and running. If any one of the remote serer is... (2 Replies)
Discussion started by: Dippu
2 Replies
10. Shell Programming and Scripting
Hey guys,
I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output)
#!/bin/bash -l
#SBATCH -p node
#SBATCH -A <projectID>
#SBATCH -n 16
#SBATCH -t 7-00:00:00
#SBATCH --mem=128GB
#SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies
LEARN ABOUT CENTOS
libssh2_sftp_rename_ex
libssh2_sftp_rename_ex(3) libssh2 manual libssh2_sftp_rename_ex(3)
NAME
libssh2_sftp_rename_ex - rename an SFTP file
SYNOPSIS
#include <libssh2.h> #include <libssh2_sftp.h>
int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, unsigned int source_filename_len, const char *dest_filename,
unsigned int dest_filename_len, long flags);
int libssh2_sftp_rename_ex(LIBSSH2_SFTP *sftp, const char *source_filename, const char *dest_filename);
DESCRIPTION
sftp - SFTP instance as returned by libssh2_sftp_init(3)
sourcefile - Path and name of the existing filesystem entry
sourcefile_len - Length of the path and name of the existing filesystem entry
destfile - Path and name of the target filesystem entry
destfile_len - Length of the path and name of the target filesystem entry
flags - Bitmask flags made up of LIBSSH2_SFTP_RENAME_* constants.
Rename a filesystem object on the remote filesystem. The semantics of this command typically include the ability to move a filsystem object
between folders and/or filesystem mounts. If the LIBSSH2_SFTP_RENAME_OVERWRITE flag is not set and the destfile entry already exists, the
operation will fail. Use of the other two flags indicate a preference (but not a requirement) for the remote end to perform an atomic
rename operation and/or using native system calls when possible.
RETURN VALUE
Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a
negative number, it isn't really a failure per se.
ERRORS
LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
LIBSSH2_ERROR_SOCKET_SEND - Unable to send data on socket.
LIBSSH2_ERROR_SOCKET_TIMEOUT -
LIBSSH2_ERROR_SFTP_PROTOCOL - An invalid SFTP protocol response was received on the socket, or an SFTP operation caused an errorcode to be
returned by the server.
SEE ALSO
libssh2_sftp_init(3)
libssh2 0.15 1 Jun 2007 libssh2_sftp_rename_ex(3)