It wouldn't even work locally. Go ahead and try it, see what happens. su will run, and cd will not run inside it - but it will run, after su quits, because that's what semicolon means. Run this command, wait for it to quit, then run that other command.
To feed something into a program, you need to use redirection.
What I do to run scripts remotely is something like:
The final EOF can't be indented, at all.
When in doubt, replace 'ssh' with 'cat' to see exactly what script you're trying to send to the far side!
I have a linux box build11 which can be pinged from build18 (Windows) box. And we can only login to the box (using SSH) from build18 box. Plz help to characterize the problem, network, DNS, DHCP, etc (or whatever which I am unsure)
Any idea what may be the reason ? :confused:
Thanks in... (4 Replies)
i have this SSH command which runs perfectly on command prompt in sunOS
ssh -o Port=${portno} ${uname}@${server} find ${dir_path} -name '***'
output : /usr/local/home/***
My problem is when i run same command in my script
#!/usr/bin/ksh
res=`ssh -o Port=${portno} ${uname}@${server}... (1 Reply)
Hi,
I have a solaris 8 machine.
I see ssh is running in the machine
sbnismwp2# ps -aef | grep ssh
root 947 945 0 04:34:45 ? 0:00 /export/opt/SSHtecagt/sbin/ssh-mgmt-sysmonitor
root 945 1 0 04:34:45 ? 0:00 /export/opt/SSHtecagt/sbin/ssh-mgmt-agent... (11 Replies)
Hi,
I am writing a script on Solaris 10 and want to execute a remote ssh command. Normally this command should just return the value 0000000000002356 but when using ssh it seems it is passing the result to the shell to execute.
ssh root@10.5.112.145 `/usr/bin/nawk -F\, '$1=="USG" && $2=="01"... (3 Replies)
I have a Solaris 9 server that does not return a ping. When I try to log in via SSH I eventually get in. I am logged in now.
I know this is a wide open question, but can you recommend some things I should check?
.
Thanks in advance,
~R (2 Replies)
Hi all,
I am using the below code to ping a code and print whehter the connection is successful or not.
use Net::Ping;
$p = Net::Ping->new();
my $host = "x.x.x.x";
# print "$host is alive.\n" if $p->ping($host);
if ($p->ping($host,3))
{
print... (0 Replies)
Hello all,
I am writing a script that pings various machines to check connectivity.
If a machine is available, the prompt returns a result immediately:
root@ops # ping 172.21.5.5
172.21.5.5 is alive
BUT
if a machine is Down , the reply takes a long time to come. The issue is I want to... (1 Reply)
I cant ping to some of my machines, but ping works.
I attach screenshots. Port is open and it is 22.
I can't figure out why i cant access.
https://www.unix.com/attachments/unix-for-advanced-and-expert-users/7492d1541541072-cant-ssh-but-ping-works-sshlisten-jpg... (17 Replies)
Discussion started by: tomislav91
17 Replies
LEARN ABOUT SUSE
ocf_pacemaker_pingd
OCF_PACEMAKER_PINGD(7) Pacemaker Configuration OCF_PACEMAKER_PINGD(7)NAME
ocf_pacemaker_pingd - pingd resource agent
SYNOPSIS
[OCF_RESKEY_pidfile=string] [OCF_RESKEY_user=string] [OCF_RESKEY_dampen=integer] [OCF_RESKEY_set=string] [OCF_RESKEY_name=string]
[OCF_RESKEY_section=string] [OCF_RESKEY_multiplier=integer] [OCF_RESKEY_host_list=string] [OCF_RESKEY_interval=integer]
[OCF_RESKEY_attempts=integer] [OCF_RESKEY_timeout=integer] [OCF_RESKEY_options=string]
pingd [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
This agent (ocf:pacemaker:pingd) has been replaced by the more reliable ocf:pacemaker:ping. It records (in the CIB) the current number of
ping nodes (specified in the 'host_list' parameter) a cluster node can connect to.
SUPPORTED PARAMETERS
OCF_RESKEY_pidfile = string [/var/run//pingd-default]
PID file
OCF_RESKEY_user = string [root]
The user we want to run pingd as
The user we want to run pingd as
OCF_RESKEY_dampen = integer [5s]
Dampening interval
The time to wait (dampening) further changes occur
OCF_RESKEY_set = string []
Set name
The name of the instance_attributes set to place the value in. Rarely needs to be specified.
OCF_RESKEY_name = string [pingd]
Attribute name
The name of the attributes to set. This is the name to be used in the constraints.
OCF_RESKEY_section = string []
Section name
The section place the value in. Rarely needs to be specified.
OCF_RESKEY_multiplier = integer []
Value multiplier
The number by which to multiply the number of connected ping nodes by
OCF_RESKEY_host_list = string []
Host list
The list of ping nodes to count. Defaults to all configured ping nodes. Rarely needs to be specified.
OCF_RESKEY_interval = integer [1]
ping interval in seconds
How often, in seconds, to check for node liveliness
OCF_RESKEY_attempts = integer [2]
no. of ping attempts
Number of ping attempts, per host, before declaring it dead
OCF_RESKEY_timeout = integer [2]
ping timeout in seconds
How long, in seconds, to wait before declaring a ping lost
OCF_RESKEY_options = string []
Extra Options
A catch all for any other options that need to be passed to pingd.
AUTHOR
Andrew Beekhof <andrew@beekhof.net>
Author.
Pacemaker Configuration 07/05/2010 OCF_PACEMAKER_PINGD(7)