SFTP not working in the background


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users SFTP not working in the background
# 1  
Old 08-19-2010
SFTP not working in the background

I'm modifying some code to SFTP files because the remote servername and user are changing. The keys have been correctly installed and I'm using the -B option to automate the actions following connection e.g. cd, put etc. This is all working nicely. However, when I wrap this up to call it from a daemon process, it hangs! Investigation seems to show that I'm getting a SIGTTOU message and the sftp process stops. The process seems to work fine to the old server - both old and new sftp servers are windows based!
Are there any SFTP server configurations that define whether the client must run interactively or daemonised?
If the server can't be changed, what options do I have at the client end? Do I catch the SIGTTOU and ignore it?

---------- Post updated at 12:13 PM ---------- Previous update was at 11:19 AM ----------

Well just rechecked connectivity to the old server which used to work but doesn't any longer, so looks like it may be a client side issue!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mget with SFTP is not working

hi Team, I am connecting from one (A) linux server to another(C)/any linux server by sftp on A linux server: sftp userid@C password: mget is Not working fine I am using mget to pull the files. it shows mget as invalid command. But from (B) Linux server to (C) /to Any server Linux... (15 Replies)
Discussion started by: johnsnow
15 Replies

2. UNIX for Dummies Questions & Answers

Background job not working as expected

Hello Unix Buddies, cat infinite.sh #!/bin/sh while true do echo "Infinite loop" doneI am running it in the background $ ./infinite.sh > /dev/null & 31634Then i do an exit or click on the cross mark to close the session. Now my expectation is that when i open up a new... (8 Replies)
Discussion started by: shellscripting
8 Replies

3. Red Hat

Sftp command not working

What is wrong with this sftp command being used in one line: sftp /Data/SEmisstn.gz lsmsadit@144.226.213.23:/test/lsms.SEmisstn.gz The ssh key is already setup. The node is valid and i can ssh to it as well as do a manual step by step sftp to the server. However, for some odd reason, i... (10 Replies)
Discussion started by: mrn6430
10 Replies

4. Shell Programming and Scripting

How to stop nohup which is working background

Please I have run a background script using nohup please tell me way to stop this. Thanks in Advance (4 Replies)
Discussion started by: mumakhij
4 Replies

5. Solaris

Why is sftp working but ftp not

I am not very familiar with the use of FTP, and trying to run it I found out that standard "ftp" is not working" but "sftp" is. If sftp is allowed will that block ftp ? and if so where is this set ? I thought there is no relationship, is that right ? If so look here: inetadm | grep ftp enabled... (11 Replies)
Discussion started by: manni2
11 Replies

6. UNIX for Advanced & Expert Users

SFTP Not Working With CRON

Hello - I have a production stream that is scheduled with cron to run each Monday morning. The jobs in the stream perform tasks including FTP get, load to a DB table, and report processing. About a month ago I was directed to begin using sftp in these jobs and since then the jobs... (12 Replies)
Discussion started by: PatrickPurfield
12 Replies

7. Shell Programming and Scripting

Multiple SQLPLUS background processes not working properly

Hi All, I am running 25 background process from a Unix shell script which calls a single Oracle procedure with different paramenters each time. These 25 process creates 25 different files. When i run these 25 Background SQLPLUS processes, few files are not created completly but if i run 25... (1 Reply)
Discussion started by: rawat_me01
1 Replies

8. Shell Programming and Scripting

Automate SFTP is not working

Hi All:cool:, i tried to automate SFTP process after passwordless authendication. Stil i am getting error... Can anyone help.... ------------------- sample code below ------------------- sftp -v $mdskk@100.4.4.75 << EOF cd /data mget *.tar.gz bye EOF... (2 Replies)
Discussion started by: senthil_seera
2 Replies

9. UNIX for Dummies Questions & Answers

sftp not working as cronjob

hi, I have a script that will automatically login into a server and get a file. it is working fine if i run it on a command line. however, when i tried to run it as a cron job, it is not working. what should i do? set timeout -1 spawn /usr/bin/sftp user1@server1 match_max 100000 expect... (3 Replies)
Discussion started by: tungaw2004
3 Replies

10. Shell Programming and Scripting

SFTP not working in cron

Hi, I have a simple script that is trying to put a file that resides on a local machine to a remote machine. It runs fine manually but does not complete when scheduling to run in cron. Here is what the script looks like. Any idea what I am doing wrong here? #!/bin/ksh cd /path sftp... (4 Replies)
Discussion started by: ewilson0265
4 Replies
Login or Register to Ask a Question
libssh2_sftp_unlink_ex(3)					  libssh2 manual					 libssh2_sftp_unlink_ex(3)

NAME
libssh2_sftp_unlink_ex - unlink an SFTP file SYNOPSIS
#include <libssh2.h> #include <libssh2_sftp.h> int libssh2_sftp_unlink_ex(LIBSSH2_SFTP *sftp, const char *filename, unsigned int filename_len); int libssh2_sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename); DESCRIPTION
sftp - SFTP instance as returned by libssh2_sftp_init(3) filename - Path and name of the existing filesystem entry filename_len - Length of the path and name of the existing filesystem entry Unlink (delete) a file from the remote filesystem. 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_unlink_ex(3)