Sponsored Content
Full Discussion: sftp status check
Operating Systems HP-UX sftp status check Post 70492 by jim mcnamara on Friday 29th of April 2005 10:13:50 AM
Old 04-29-2005
The -b flag in OpenSSH causes sftp to run in batch mode. While in batch mode, sftp will exit and return an error code of "0" when any get, put, etc. fails. sftp returns a "1" and exits if the connection to the remote fails, or if the user cancels using CTRL-C.

That's all there is as far as I know.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ftp Status Check

Hi, I'm using the below script to ftp the file passed as 3rd argument. I'm passing the source and destination directory as 1st and 2nd argument. This script does the ftp successfully. The script displays the echo before ftp stmt and does the ftp and does not display the stmts after that... (4 Replies)
Discussion started by: acheepi
4 Replies

2. Shell Programming and Scripting

check the status and send an email with status

Hi, We have a text file which has the following data. ISA~00~ ~00~ ~ZZ~VISTN ~ZZ~U1CAD ~051227~183 7~U~00200~000011258~0~P~< GS~FA~EE05J~U1CAD~051227~1831~000011258~X~002002 ST~997~0001 AK1~SH~247 AK2~856~2470001 AK5~A AK2~856~2470002 AK5~A... (3 Replies)
Discussion started by: isingh786
3 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. AIX

check the status of ypbind

hello , How do i to check the status of ypbind on AIX(5.3) platform ? Thanks AVK Linux (1 Reply)
Discussion started by: avklinux
1 Replies

5. Solaris

SFTP Status

hey, i have been looking around and i cant find anything and dont believe there is no way to do it. all i want is to know the status of my sftp. want to know if the put or get is successful. in FTP you get 220 etc and this worked for me. but not so striaght forward with SFTP. anyone have... (1 Reply)
Discussion started by: dshakey
1 Replies

6. Shell Programming and Scripting

Script for SFTP Status Checking

Greetings... I have to construct shell script to check the SFTP status, Define a global variable (say sftpStatus). Set it to default value "success" when you define it first time outside the script. check the current SFTP status (say currentStatus - local variable within the script) if... (16 Replies)
Discussion started by: manju98458
16 Replies

7. Shell Programming and Scripting

Check HD status

I have some server ( IBM , Dell ) , our data center is not in the same location with office , therefore , I do not know if the HD lamp is flash when the HD is fault , can advise if I can write a script to check if the HD is normal running or not ? thanks (1 Reply)
Discussion started by: ust
1 Replies

8. Red Hat

Check PSU Status

Hello, We have a cluster and each server have 2 PSU. An alarm should be raised in case of failure so we need to check periodically the PSU status wth a script. The first idea was to check with ipmitool but this take some time to get the data and we face some other issues now due to that... (1 Reply)
Discussion started by: @dagio
1 Replies

9. Shell Programming and Scripting

How to check the status of sftp connection is successful or not in Linux?

Hi All, We are working on linux with putty terminal for file transferring using SFTP server... here we want to know /We have Urgent Requirement If SFTP connection is successfull then we should get .txt log file in target locaton as "Success/Failure" Please provide batch script for above... (7 Replies)
Discussion started by: sravanreddy
7 Replies

10. 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
SSH2_SFTP_MKDIR(3)							 1							SSH2_SFTP_MKDIR(3)

ssh2_sftp_mkdir - Create a directory

SYNOPSIS
bool ssh2_sftp_mkdir (resource $sftp, string $dirname, [int $mode = 0777], [bool $recursive = false]) DESCRIPTION
Creates a directory on the remote file server with permissions set to $mode. This function is similar to using mkdir(3) with the ssh2.sftp:// wrapper. PARAMETERS
o $sftp - An SSH2 SFTP resource opened by ssh2_sftp(3). o $dirname - Path of the new directory. o $mode - Permissions on the new directory. o $recursive - If $recursive is TRUE any parent directories required for $dirname will be automatically created as well. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Creating a directory on a remote server <?php $connection = ssh2_connect('shell.example.com', 22); ssh2_auth_password($connection, 'username', 'password'); $sftp = ssh2_sftp($connection); ssh2_sftp_mkdir($sftp, '/home/username/newdir'); /* Or: mkdir("ssh2.sftp://$sftp/home/username/newdir"); */ ?> SEE ALSO
mkdir(3), ssh2_sftp_rmdir(3). PHP Documentation Group SSH2_SFTP_MKDIR(3)
All times are GMT -4. The time now is 12:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy