05-12-2019
Is the file created?
Is the flag changed?
Is the while condition met?
Is the sftp operation executed?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell/guide me how to check remote host is up/running using bash script?
Thanks.
Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies
2. Shell Programming and Scripting
I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies
3. Shell Programming and Scripting
Gurus/Experts
We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Discussion started by: anjum.suri
6 Replies
4. UNIX for Advanced & Expert Users
I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1.
When I do a who -m from A2, I see the "connected from" as "A1".
=> who -m
userid pts/2 2010-03-27 08:47 (A1)
I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies
5. Shell Programming and Scripting
Hi,
My script needs to check whether the remote host is up or not.
If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is down?
Could someone help me out in this?
Regards
Arun (4 Replies)
Discussion started by: arunkumarmc
4 Replies
6. Shell Programming and Scripting
Hi all,
I am a beginner to shell script.Can any one please help me on the below requirement
I need to check whether the file (called 3Com_Files_Delivered.txt) exists on the remote mechaine or not? if so i need to copy all the files from there to my local mechaine.Especially i am... (7 Replies)
Discussion started by: narasimha123
7 Replies
7. Shell Programming and Scripting
flamingo:~ jnojr$ ssh -t macbook sudo -v
Password:
Connection to macbook closed.
flamingo:~ jnojr$ ssh -t macbook sudo cat /etc/cma.conf | grep CMABuildNumber
<CMABuildNumber>2918</CMABuildNumber>
Connection to macbook closed.
flamingo:~ jnojr$ ssh -t macbook sudo -k
Connection to macbook... (3 Replies)
Discussion started by: jnojr
3 Replies
8. UNIX for Dummies Questions & Answers
I am able to connect to a remote host using the legacy IP and port 2222.
Today the remote has a new IP I am unable to connect.
How to check if the remote host is blocking or if its my server is unable to connect.
Err Msg : telnet: Unable to connect to remote host: Connection refused
Err... (5 Replies)
Discussion started by: ITDev01
5 Replies
9. Shell Programming and Scripting
Hi,
Given addresses of 2 remote machines, using a shell script is it possible to
get the state of running processes in "src"
stop all the processes in "src"
exit out of "src"
ssh into "dest"
resume the state of executing processes captured in step 1 in "dest"
Assumption:
"src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies
10. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
LEARN ABOUT PHP
ssh2_sftp_mkdir
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)