sftp hanging on exit


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users sftp hanging on exit
# 1  
sftp hanging on exit

Hi,

I am doing a sftp from solaris 2.8 box to windows XP box. I am able to transfer the files successfully from the windows box to Solaris box (that is only I need).

Problem arises when I try to exit/quit from the sftp session. sftp gets hung and I have to kill the telnet session by closing the window. No interrupts are working (ctrl+c, ctrl+z, ctrl+l, ctrl+u, etc...)

I need to use this sftp transfer in one script...Please help.


Regards,
Abhishek
# 2  
Use "strace" to debug

Abhishek,
Some programs have few compatibility issues with "Terminal" and related libraries like "curses" etc. The only way to troubleshoot is run your complete command with "strace" and redirect stdout and stderr to some log-file. You may able to locate the root of problem.
Alternatively you can download the source and compile it on the target machine where you want to run intended script. That may eliminate problem
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #796
Difficulty: Medium
Fractions in binary arithmetic terminate only if 2 is the only prime factor in the denominator.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Exit Status 255, Connection closed in SFTP

I'm trying to connect from Server A to Server B to transfer files from A to B. I'm using NUID A1 in Server A and NUID A2 in Server B. I have done the following the steps to setup password-less login. 1. Add the public key of A1 in A to the Authorized keys of A2 in B. 2. Add the public key of... (4 Replies)
Discussion started by: sanchid312
4 Replies

2. UNIX for Advanced & Expert Users

Need a exit from sftp if its ask for password and continue to run remaining part of script.

Hi I am checking status of sftp in Health check script, sftp command is used to connect the server with secure RSA key, which is successfully get connected most of the time but in some case if RSA key ask for password then I need to exit sftp command after few second and continue to run... (1 Reply)
Discussion started by: ketanraut
1 Replies

3. Shell Programming and Scripting

Sftp hanging at exit

Hi All I was trying to execute below sftp command. echo "cd /${CUST_ID}/inbound/${SAFET_ID}" > $BATCHFILE echo "put ${SOURCE_FILE} ${FILE_NAME}" >> $BATCHFILE echo "exit" >> $BATCHFILE cmd="sftp -o port=2022 -b $BATCHFILE user@$SERVER" $cmd >> $LOGFILE 2>&1 if 2>>$LOGFILE then... (3 Replies)
Discussion started by: Girish19
3 Replies

4. Shell Programming and Scripting

Difference between exit, bye and quit in sftp

Hi All, I would like to know whether is there any difference in closing the sftp connection with exit, bye and quit. And would like to know the reliable command. (3 Replies)
Discussion started by: Girish19
3 Replies

5. Shell Programming and Scripting

Sftp hanging

Hi All, I am transfering a file through sftp. But the script is hanging at exit occasionally. I am suspecting that sftp is hanging due to buffer size issue. If that is the case can any body suggest a solution. Please find the code. echo "cd /${CUST_ID}/inbound/${SAFET_ID}" >... (0 Replies)
Discussion started by: Girish19
0 Replies

6. Shell Programming and Scripting

How to Log No Connect Error and then Exit using SFTP?

Solaris 10 9/10 BASH using the following code snippet: sftp $TOHOST <<RESULT cd /inbound/ lcd /transfer put $i bye I want to log no server connections and the kill the script after the log entry was made. How would I do... (2 Replies)
Discussion started by: os2mac
2 Replies

7. Solaris

Exit status 255 on sftp

HI guys When i try SFTP to a machine using a user account whose entry in /etc/passwd as follows user:x:8005:508::/export/home/user:/bin/false and i am not placed my keys over there i am using the password option in the sftp Since the keys are not there it ask for the password ... (5 Replies)
Discussion started by: GIC1986
5 Replies

8. Shell Programming and Scripting

How to get the exit satus of a command which I executed in sftp prompt

Hi All, I need the exit status of a command which is executed through sftp connection. Example: sftp user@host <<EOF mkdir /home/karteek/testing put /home/xyz.txt /home/karteek/testing EOF ------ In the above example, I need the exit status of the put command. Please help me. ... (2 Replies)
Discussion started by: Karteek
2 Replies

9. Shell Programming and Scripting

Exit codes in SFTP

HI All, I have created a unix script which takes 2 parameters and using sftp tranfers files to remote location following is the script #!/bin/ksh # # # Parameter 1 is the complete path of the destination server # Parameter 2 is the complete path of the file which is to be FTP... (1 Reply)
Discussion started by: vikramsnest
1 Replies

10. UNIX for Dummies Questions & Answers

Where can I find a list of exit codes? (Exit code 64)

Iím receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. Iím assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies

Featured Tech Videos