Sponsored Content
Full Discussion: issue a ping on a remote box
Top Forums Shell Programming and Scripting issue a ping on a remote box Post 302259884 by yongitz on Wednesday 19th of November 2008 06:55:48 AM
Old 11-19-2008
Why not try assigning your check result to a variable like:
Code:
check=`ssh boxB "ping -s 1 -w 1 -c 1 $1" > /dev/null; echo $?`
if [ "$check" -eq "0" ]; then 
echo "ping successful!"
else
echo "can't ping!"
fi

That's just to simplify things.. at least for me.
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

securing a remote box

someone has access to my server... I've got a solaris 7 box with remote access only. many of the services don't have passwords and someone recently messed with the shadow file -the root: line was changed: . password field was changed to NP . the number after that was changed too The... (8 Replies)
Discussion started by: sphiengollie
8 Replies

2. SCO

Openserver 5.0.4 can't be ping or telnet into from a remote site

Hi, Can anybody help me out why l can't not ping my server with Openserver 5.0.4 with my windows machine from a remote site. The machine could see the local LAN with the Router however, i can't ping or telnet unto the server from another site on the WAN. The default gateway was configure on the... (0 Replies)
Discussion started by: kayode
0 Replies

3. Programming

cathcing `mozilla -remote ping()` within c++

Here is my problem. An extension and alternative to my initial post https://www.unix.com/showthread.php?t=18043 This is what I have done so far to counter it. In my application, I have used /usr/bin/mozilla -remote "openURL(URL)" The -remote makes sure that I go and open the URL in an... (1 Reply)
Discussion started by: vino
1 Replies

4. Linux

Can't SSH / ping Linux box !!!

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

5. Shell Programming and Scripting

Help with Ping command for windows Box

Hi, I would like to write a script for checking the windows remote server has responding or not from Unix box. 123.34.56.222-- the windows remote server I wrote like: ping 123.34.56.222 PING 123.34.56.222: 64 byte packets 64 bytes from 123.34.56.222: icmp_seq=0. time=8. ms 64... (1 Reply)
Discussion started by: koti_rama
1 Replies

6. Linux

How to find remote Linux box login account without login in to that box?

Hi, How to find remote Linux box login account without login in to that box? I don't have login account at my remote Linux box. But I need who are all having login account. How do I findout? Thanks, --Muthu. (3 Replies)
Discussion started by: Muthuselvan
3 Replies

7. Red Hat

Can't ping my unix box by name

Hi All, I have recently setup a Windows 2003 server as AD / Domain Controller. In it, I have a VMWare for RHEL 4. I have 3 other computers connected to the network all using Windows 7. These computers can ping each other by name. But none of these can ping the Unix OS in the VMWare of the... (5 Replies)
Discussion started by: adshocker
5 Replies

8. AIX

Ping to remote host failed

Actually. I was getting a ping to remote host failed for one of my etherchannel. When I checked it was in backup adapter and again I use to faileover and brought to primary channel. But it was again going to backup channel and giving me the alert ping to remotehost failed. When I checked the load... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies

9. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

10. BSD

Ping remote sever, nc, telnet, whatever

I put this thread to shell and bsd, because I want to resolve this matter on bsd. May somebody can explain to me how to ping a remote server, in unix. BTW the following code examples were tried on a linux system as well, with the same output, nothing. But on my bsd are not installed nmap neither... (4 Replies)
Discussion started by: 1in10
4 Replies
DNPING(1)						      General Commands Manual							 DNPING(1)

NAME
dnping - Loopbacks diagnostic packets through a remote node SYNOPSIS
dnping nodename [user pass] count or dnping nodename [options] nodename Options: [qsv] [-c number] [-i interval] [-p password] [-s size] [-u username] [-w timeout] DESCRIPTION
This utility sends to remote DECnet node nodename the number of packets specified by count to test the link between the two systems. Optionally a username and password may be specified for the connection as well as several other options. NOTE that if you dnping another Linux box it must have dnetd running. NOTE also that dnping is not really like an IP "ping" in that it needs a registered object at the other end to connect to. So, just because you cannot ping a machine does not, necessarily, mean that machine is not available, just that the MIRROR object is not available. There is not (to my knowledge) a low-level equivalent in DECnet of the ICMP ping message. OPTIONS
-c number Number of packets to send (default 10) -d Debug mode (default off) -i interval interval between packets in microseconds (default 0) -p password Access control password. If this is "-" then you will be prompted. -q Quiet mode (default off) -s size size of frame to send in bytes (40 data + 68 hdr) -t timestamps mode (default off) -u username access control username -w timeout Specifies a timeout (in seconds). If not response is received after this time then dnping will abort. The default is to wait for- ever. -v verbose mode (default off) EXAMPLES
Pings 10 packets through remote node "mv3100" # dnping mv3100 10 Make it look a bit like IP ping: # dnping -vti 1000000 marsha SEE ALSO
dntype(1), dndir(1), dndel(1), dntask(1), sethost(1), dnetd(8) DECnet utilities January 25 2000 DNPING(1)
All times are GMT -4. The time now is 05:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy