Sponsored Content
Full Discussion: SFTP HANGS
Top Forums Shell Programming and Scripting SFTP HANGS Post 302489611 by mohanpadamata on Friday 21st of January 2011 12:28:37 AM
Old 01-21-2011
MySQL SFTP HANGS

Hi ,

we are writing a shell script to test connection of our destination servers and facing an issue if the destination server doesnt respond. we are using the following command.,
Code:
sftp -B /dev/fd/0 <host@servername> << EOF >> file.txt
quit
EOF

---------
The above command hangs for 20min and returns the following code,
Code:
warning : Connecting to <server> failed : Connection timed out.

-------------
here the exit code is zero instead of non-zero. so the script goes to success.

i have tried following options but didnt work for me.
Code:
set timeout 10
set -e timeout 10
sftp -o ConnectTimeout=10 <host@servername>

I have gone through the previous posts in this forum but didnt get any useful information.

Please help me to get proper output in case of failures.

Thanks in advance..

Cheers,
Mohan


Moderator's Comments:
Mod Comment Please use code tags when posting data and code samples!

Last edited by Franklin52; 01-21-2011 at 03:45 AM..
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

WRQ Reflection SFTP process hangs when run using windows scheduler

Hi I am doing development on .net framework on Win 2003 box. I am scheduling a job using Windows scheduler to kick off SFTP of files from a local directory to a remotre Unix box. I am using WRQ Reflection Multihost v12.0.7 standard edition for this. Here is how we are scheduling the thing.... (0 Replies)
Discussion started by: kapilash
0 Replies

2. Red Hat

ls hangs on a directory

Running Red Hat Enterprise Linux Server release 5.1 (Tikanga) 2.6.18-53.el5 Trying to do an 'ls' of a sub-directory and the prompt never returns. Same problem running a find command as well. I have done an fsck on the file system (no problems) and can view other sub-directories on this... (5 Replies)
Discussion started by: wazzu62
5 Replies

3. Solaris

Explorer hangs

Hi Guys, Anyone encontered a problem where when you run your SUN explorer, it hangs at sysconfig? I am having this problem for some of my servers. rgds, (1 Reply)
Discussion started by: ronny_nch
1 Replies

4. Shell Programming and Scripting

sftp from solaris to windows 2008 hangs

Hi All,Our sftp connection from Solaris to windows 2008 hangs with following verbose output. From the output I can see that the connection itself ( key matching ) is successful , but I can't see sftp prompt.Sun_SSH_1.1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090704f debug1: Reading configuration data... (1 Reply)
Discussion started by: rahulkav
1 Replies

5. Shell Programming and Scripting

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. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

6. UNIX for Advanced & Expert Users

SFTP. ls and get hangs.

Hello I have a sftp problem. If I do sftp between some nodes that we installed it works fine i can list directories and get files. If I connect with sftp from the other side of a firewall (wich has port 22 open) I can log in and cd to which ever direcory i want i can do pwd but when i do... (4 Replies)
Discussion started by: vettec3
4 Replies

7. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

8. Red Hat

Xrdp hangs

Hi, I'm trying to get xrdp to work. I installed xrdp 0.5.0 from EPEL and the Desktop group. Now I can connect to the server with rdesktop, but I can't do any input... there is an authentication window asking the root password "to set the network proxy used for downloading packages" and I can't... (0 Replies)
Discussion started by: FrankVanDamme
0 Replies

9. IP Networking

SFTP hangs

Ok sftp connects but hangs after I enter the password manually The ssh version is 1.0 bash-2.05$ ssh -V SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0. When I go from solaris 9 to sftp to another server with latest proftpd version it hangs after the password. proftpd -V Compile-time... (6 Replies)
Discussion started by: slufoot80
6 Replies

10. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies
Locale::Script(3pm)					 Perl Programmers Reference Guide				       Locale::Script(3pm)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $script = code2script('phnx','alpha'); $script = code2script('phnx',LOCALE_SCRIPT_ALPHA); The codesets currently supported are: alpha, LOCALE_SCRIPT_ALPHA This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. It also includes additions to this set included in the IANA language registry. The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. num, LOCALE_SCRIPT_NUMERIC This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.unicode.org/iso15924/ Home page for ISO 15924. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Script(3pm)
All times are GMT -4. The time now is 11:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy