libssh2_sftp_close_handle(3) libssh2 manual libssh2_sftp_close_handle(3)NAME
libssh2_sftp_close_handle - close filehandle
SYNOPSIS
#include <libssh2.h> #include <libssh2_sftp.h>
int libssh2_sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle);
int libssh2_sftp_close(LIBSSH2_SFTP_HANDLE *handle);
int libssh2_sftp_closedir(LIBSSH2_SFTP_HANDLE *handle);
DESCRIPTION
handle - SFTP File Handle as returned by libssh2_sftp_open_ex(3) or libssh2_sftp_opendir(3) (which is a macro).
Close an active LIBSSH2_SFTP_HANDLE. Because files and directories share the same underlying storage mechanism these methods may be used
interchangably. libssh2_sftp_close(3) and libssh2_sftp_closedir(3) are macros for libssh2_sftp_close_handle(3).
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_open_ex(3)libssh2 0.15 1 Jun 2007 libssh2_sftp_close_handle(3)
Check Out this Related Man Page
libssh2_sftp_read(3) libssh2 manual libssh2_sftp_read(3)NAME
libssh2_sftp_read - read data from an SFTP handle
SYNOPSIS
#include <libssh2.h> #include <libssh2_sftp.h>
ssize_t libssh2_sftp_read(LIBSSH2_SFTP_HANDLE *handle, char *buffer, size_t buffer_maxlen);
DESCRIPTION
handle is the SFTP File Handle as returned by libssh2_sftp_open_ex(3)
buffer is a pointer to a pre-allocated buffer of at least
buffer_maxlen bytes to read data into.
Reads a block of data from an LIBSSH2_SFTP_HANDLE. This method is modelled after the POSIX read(2) function and uses the same calling
semantics. libssh2_sftp_read(3) will attempt to read as much as possible however it may not fill all of buffer if the file pointer reaches
the end or if further reads would cause the socket to block.
RETURN VALUE
Number of bytes actually populated into buffer, 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_open_ex(3)libssh2_sftp_read(3)libssh2 0.15 1 Jun 2007 libssh2_sftp_read(3)
Hi,
Could you please help to solve the below issue...
my requirement is automate the SFTP between UNIX and Windows server.
I want to get and put some files to UNIX AIX machine(SFTP client) to Windows server(SFTP server).
For that, i have generated key pair (private/public) in my AIX machine .... (6 Replies)
Hello Guys,
I was looking for a method for passwordless SFTP from Solaris to Windows server.
I googled a lot, but could not find anything which would suit my purpose. All I found on google was the error messages that people got, but not how to do it.
Please help. I am in urgent need of it. (7 Replies)
I shall explain the situation that I am facing to the best extent possible. I require some help, as this situation is an urgent one.
I am trying to automate sending data from one AIX machine to another. A script runs that tries to push data received from an upstream application to another AIX... (7 Replies)
Hi All,
need help.
i am doing one SFTP and now need to automate that.
how can i achive it with non interactive mode?
SFTP user@172.*.*.*
then it is asking for password.
after providing that its getting connected.
can you please help me so that i can give the password at a go... (9 Replies)
Dear all,
I was given the ID_DSA.pub by an MVS user, which I placed in the appropriate user's authorized_keys file. When the user tris to SFTP from their side to the AIX box, the following error is got:
error: debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY ... (6 Replies)
Hi All,
I have followed the steps to set up the public and private keys for SFTP setup. Somehow the SFTP is not working and I get following errors:
==> sftp -v remote_user@remote_host_name_changed
OpenSSH_5.4p1, OpenSSL 0.9.8m 25 Feb 2010
debug1: Reading configuration data... (12 Replies)
When I try to SFTP from our UNIX box to an outside vendor using passwords - no keys, I am immediately get disconnected.
We have the FIREWALL open because I get prompted for the password.
Here's the error:
sftp userid@sftp.test.com
Connecting to sftp.test.com...
userid@sftp.test.com's... (5 Replies)
Greetings...
I have to construct shell script to check the SFTP status,
Define a global variable (say sftpStatus). Set it to default value "success" when you define it first time outside the script.
check the current SFTP status (say currentStatus - local variable within the script)
if... (16 Replies)
Hi all the gurus out there, I am trying to SFTP about 30000 small files (4MB each at most) but I'm getting "xrealloc: out of memory" error. Anyone encountered this before? I'm on AIX6. (4 Replies)
Hi All,
I have a pretty demanding requirement for an SFTP script I have been trying to put together.
I have nearly 100 files (all with the names staring with T_PROD) generated in my local server daily. I need to transfer each of these files to a remote server via SFTP (that's a client... (6 Replies)
hi guys,
i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not
and again i have to reverse sftp the files from unix to windows server.....
regards,
Vasa Saikumar. (13 Replies)
I need help writing a simple SFTP shell script to transfer a few files. What I have is server info of the remote computer I will be sending the files to. Please help I am new to the shell/linux stuff.
Example: Password: 1234
User: We1234
We12345@hostname.com
... (3 Replies)
We are receiving data feed files in SFTP location daily. so the folder structure in SFTP location is abc/def/studyname_1/outbound/zipped files
So we will be getting different studies and for each study a folder is created abc/def/studyname_2/outbound/zipped files , ... (7 Replies)
Hi Guys Any help is appreciated very much!
I'm trying to use SFTP to an external server using the native SFTP Client in RHEL 6 and 7.
I've been given a username on the remote SFTP Server of myemail@myorg.com.
I can not seem to escape that @ sign no matter what I do.
I've tried these... (16 Replies)