Top Forums Shell Programming and Scripting How to Log No Connect Error and then Exit using SFTP? Post 302746035 by os2mac on Tuesday 18th of December 2012 04:16:36 PM
Oracle How to Log No Connect Error and then Exit using SFTP?

Solaris 10 9/10

using the following code snippet:

                cd /inbound/
                lcd /transfer
                put $i

I want to log no server connections and the kill the script after the log entry was made. How would I do that?
Test Your Knowledge in Computers #590
Difficulty: Easy
In a linear search algorithm, the input size is the number of elements in the collection (n) divided by 2.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

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... (1 Reply)
Discussion started by: max29583
1 Replies

2. 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

3. 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

4. Cybersecurity

sftp client can't connect

Hi. I'm trying to use my sftp client on solaris 9 to connect to an sftp server. ssh is installed correctly and I can see my pub/priv key files in the ~/.ssh directory. When I run sftp -v <target> I get: bash-2.05# sftp -v Connecting to debug1: SSH... (2 Replies)
Discussion started by: skowal
2 Replies

5. UNIX for Dummies Questions & Answers

SFTP error when trying to connect

Hi, I am getting the following error when trying to use SFTP to go from my PROD to DEV. We are running AIX 5.3 64 bit. /home/tcutil/scripts 3720=>sftp -o Cipher=blowfish -o Compression=yes dradmin@xyz Connecting to xyz.... dradmin@xyz's password: buffer_get_ret: trying to get more bytes... (11 Replies)
Discussion started by: ramangill
11 Replies

6. Emergency UNIX and Linux Support

Unable to connect using SFTP

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)
Discussion started by: ggayathri
7 Replies

7. 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@ The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

8. 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

9. 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

10. UNIX for Advanced & Expert Users

Connect direct - SFTP - List of servers that I can connect

Greetings Experts, I am working for a bank client and have a question on connect-direct and SFTP. We are using Linux RedHat servers. We use connect-direct to transfer (NDM) files from one server to another server. At times, we manually transfer the files using SFTP from one server to another... (2 Replies)
Discussion started by: chill3chee
2 Replies
sftp-server(1M) 					  System Administration Commands					   sftp-server(1M)

sftp-server - SFTP server subsystem SYNOPSIS
/usr/lib/ssh/sftp-server DESCRIPTION
sftp-server implements the server side of the SSH File Transfer Protocol as defined in the IETF draft-ietf-secsh-filexfer. sftp-server is a subsystem for sshd(1M) and must not be run directly. There are no options or config settings. To enable the sftp-server subsystem for sshd add the following to /etc/ssh/sshd_config: Subsystem sftp /usr/lib/ssh/sftp-server See sshd_config(4) for a description of the format and contents of that file. There is no relationship between the protocol used by sftp-server and the FTP protocol (RFC 959) provided by in.ftpd. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/usr/lib/sftp-server ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshdu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
sftp(1), ssh(1), ssh-add(1), ssh-keygen(1), sshd(1M), sshd_config(4), attributes(5) To view license terms, attribution, and copyright for OpenSSH, the default path is /var/sadm/pkg/SUNWsshdr/install/copyright. If the Solaris operating environment has been installed anywhere other than the default, modify the given path to access the file at the installed location. AUTHOR
Markus Friedl SunOS 5.10 30 Jul 2003 sftp-server(1M)

Featured Tech Videos

All times are GMT -4. The time now is 05:01 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy