Sponsored Content
Top Forums Shell Programming and Scripting SFTP to server, pulling data and removing the data Post 302400433 by zaxxon on Wednesday 3rd of March 2010 07:26:09 AM
Old 03-03-2010
Don't know about ncftpget - it has to be absolutely compatible to sshd/sftp in order to make it work.
Also using sftp is not about using ftp-scripts like here-scripts to use user and password etc. It is about exchanging public keys to make it work.

Recommendation is to exchange public keys (created without passphrase) in the direction you need them and set up a small script that does scp instead of sftp, if that is hopefully an option for you. Syntax is similar to rcp.
There are several threads here in the forum and on the web about it how to set it up.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pulling data and following lines from file

I saw a few posts close to what i want to do, but they didn't look like they would work exactly.. or I need to think out of the box on this. I have a file that I keep server stats in for my own performance analysis. this file has the output from many commands in it (uptime, vmstats, ps, swap... (2 Replies)
Discussion started by: MizzGail
2 Replies

2. Shell Programming and Scripting

Pulling data from a standard comment block - perl

OK so I've inherited a set of scripts that do some work on a database. They do all have a standard comment block at the beginning that has good information on the script. I would like to generate a quick web page report that lists the script name and the description lines (for now it may be... (1 Reply)
Discussion started by: khuilman
1 Replies

3. Shell Programming and Scripting

Help with pulling / filtering data from a .csv

Good day Gurus, I have a csv file that contains an inventory of active servers. This csv file contains a well over a hundred systems (IBM, SUN, HP). It also contains those systems details. See below for an example hostA,invver,1.02,20100430 hostA,date,08/30/2010,06:18 hostA,use,"Unknown... (4 Replies)
Discussion started by: LuffyDMonkey
4 Replies

4. Shell Programming and Scripting

Pulling data by GPS coordinates from text file

Hi there, I'm having a problem trying to extract data from within a text file. I'm trying to extract this manually for a lack of better words. I need any items that fall within latitude 36.5 to 39.5 and long -75.3 to -83.9 I have been doing this using cat neta.txt | grep '!38' and working... (6 Replies)
Discussion started by: Mikey
6 Replies

5. Shell Programming and Scripting

Using SFTP and FTP to transfer data from One Remote Server To Another

HI I need to write a script in 415univ server which should go to 534unix server and move the files from there to windows server. I am not able to get it bcoz sftp prompt is not allowing ftp command. Can some one plz help me Thanks in advance (3 Replies)
Discussion started by: himakiran9
3 Replies

6. Shell Programming and Scripting

Pulling data from xml

Hi there, Please could anyone help with this. I have an xml file that contains repeating values eg <Rule name> AAAAA <Action> BBBBB </Action> <Data> CCCCC </Data> <Type> DDDDD </Type> </Rule name> <Rule name> A1A1A1A1 <Action> B1B1B1B1 </Action> <Data> C1C1C1C </Data> <Type>... (4 Replies)
Discussion started by: ssideel
4 Replies

7. Shell Programming and Scripting

BASH- Need help pulling data from .emlx

Hello, fellow computer junkies. First time poster! My boss wrote an application (Mavericks 10.9, Mountain Lion 10.8) that checks a user's security settings. The user runs the application, then it spits out an email that is sent back to our inbox showing the results. On our end, we have a mail rule... (5 Replies)
Discussion started by: sudo
5 Replies

8. Shell Programming and Scripting

Pulling Data, Then Moving to the Next File

I'm scanning a list of emails- I need to pull 2 pieces of data, then move to the next file: Sender's Email Address Email Date I need these to be outputted into a single column- separated by a ",". Like this: Email1's Address, Email1's Date Stamp Email2's Address, Email2's Date Stamp... (4 Replies)
Discussion started by: sudo
4 Replies

9. Shell Programming and Scripting

Pulling information from a data file by date

awk -v now="$(date +%s)" -v tDiff="${USERMINUTES}" ' BEGIN { FS="=" if (!now) now=systime() if (!tDiff) tDiff=60*60 p=1 } /{/ {rec=$0;p=1;next} /}/ && rec && p {print rec ORS $0;next} $1=="entry_time" { if (now-$2>tDiff)p=0 } {rec=rec ORS $0}'... (6 Replies)
Discussion started by: SkySmart
6 Replies
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)
All times are GMT -4. The time now is 02:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy