Sponsored Content
Full Discussion: Need help
Top Forums Shell Programming and Scripting Need help Post 302348573 by sb008 on Friday 28th of August 2009 03:43:20 PM
Old 08-28-2009
cat atwork.sh

Code:
#!/usr/bin/bash
COWORKER=${1}

echo "Check and see if ${COWORKER} is in"
who | grep -i ${COWORKER} > /dev/null
if [ ${?} -eq 0 ]
then
  echo "Yes"
else
  echo "No"
fi

Execute:
# atwork.sh bill
 
SSH2_METHODS_NEGOTIATED(3)						 1						SSH2_METHODS_NEGOTIATED(3)

ssh2_methods_negotiated - Return list of negotiated methods

SYNOPSIS
array ssh2_methods_negotiated (resource $session) DESCRIPTION
Returns list of negotiated methods. PARAMETERS
o $session - An SSH connection link identifier, obtained from a call to ssh2_connect(3). RETURN VALUES
EXAMPLES
Example #1 Determining what methods were negotiated <?php $connection = ssh2_connect('shell.example.com', 22); $methods = ssh2_methods_negotiated($connection); echo "Encryption keys were negotiated using: {$methods['kex']} "; echo "Server identified using an {$methods['hostkey']} with "; echo "fingerprint: " . ssh2_fingerprint($connection) . " "; echo "Client to Server packets will use methods: "; echo " Crypt: {$methods['client_to_server']['crypt']} "; echo " Comp: {$methods['client_to_server']['comp']} "; echo " MAC: {$methods['client_to_server']['mac']} "; echo "Server to Client packets will use methods: "; echo " Crypt: {$methods['server_to_client']['crypt']} "; echo " Comp: {$methods['server_to_client']['comp']} "; echo " MAC: {$methods['server_to_client']['mac']} "; ?> SEE ALSO
ssh2_connect(3). PHP Documentation Group SSH2_METHODS_NEGOTIATED(3)
All times are GMT -4. The time now is 06:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy