Ping test a device in remote networkTunnel through a NATWait until no incoming network connection for N...

How does turbine efficiency compare with internal combustion engines if all the turbine power is converted to mechanical energy?

Does Swashbuckler's Fancy Footwork apply if the attack was made with Booming Blade?

What's /System/Volumes/Data?

Why would the US President need briefings on UFOs?

What is "Wayfinder's Guide to Eberron"?

Why is Boris Johnson visiting only Paris & Berlin if every member of the EU needs to agree on a withdrawal deal?

Why does my house heat up, even when it's cool outside?

The teacher logged me in as administrator for doing a short task, is the whole system now compromised?

Potential new partner angry about first collaboration - how to answer email to close up this encounter in a graceful manner

Can you feel passing through the sound barrier in an F-16?

What are the pros and cons of Einstein-Cartan Theory?

Why didn’t Doctor Strange stay in the original winning timeline?

Vacuum collapse -- why do strong metals implode but glass doesn't?

How to avoid using System.String with Rfc2898DeriveBytes in C#

Starships without computers?

How to "know" if I have a passion?

(Why) May a Beit Din refuse to bury a body in order to coerce a man into giving a divorce?

How much code would a codegolf golf if a codegolf could golf code?

Is there such a thing as too inconvenient?

How big would a Daddy Longlegs Spider need to be to kill an average Human?

Is refusing to concede in the face of an unstoppable Nexus combo punishable?

To "hit home" in German

Why doesn't the Falcon-9 first stage use three legs to land?

What is the improvement of the "legally binding commitment" proposed by Boris Johnson over the existing "backstop"?



Ping test a device in remote network


Tunnel through a NATWait until no incoming network connection for N minutes, then execute a commandiptables configuration - ssh connection only from a remote networkTwo network interfaces (eth0 and eth1) of same linux machine can't ping each otherWhy are routes set in /etc/network/interfaces not added when the interface comes up?Network manager default configuration file?SSH won't work before manually restarting networking.serviceNetwork Interface VLAN static addressingHow to set up PulseAudio remote properly and securely?Ping behavior of two netctl interfaces






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Trying here to perform some tests on a device in a remote network.



Already managed to do it using SSH between client and server, then ping command, but thought if there wasn't better way to do it.



ssh -o ConnectTimeout=5 -t email@addr.com "ping -i 1 -c 1 -W 1 192.168.12.115 > /tmp/ping.txt"



Any sugestion?



Follows diagram of current situation.
Current Diagram










share|improve this question




















  • 1





    "Better" in what sense. Your current command leaves the ping.txt file on the server. Is that where you want it? If not, then just ssh ... "ping ..." >/tmp/ping.txt to save it on the client.

    – Kusalananda
    2 days ago













  • Somehow faster, don't know! Would be SSH the most efficient way to keep pinging a device in a remote network every 5secs? Isn't there a command that would do it more efficiently? And yes, I'd prefer to keep the ping.txt file in the server for now! Maybe later I'd remove it, don't know!

    – Vasconcelos1914
    2 days ago






  • 1





    If you want to ping it efficiently every 5 seconds, you would not connect with ssh every five seconds, but connect (once) and then use ping -i 5 -c 0 (or without the -c option, depending on what ping implementation you are using). I'm not posting this as a solution as I don't know whether it solves any problem.

    – Kusalananda
    2 days ago













  • I believe yes, it does solves the problem, if you're saying that it is currently the best way. But is there no problem in keeping an active ssh connection between server/client?

    – Vasconcelos1914
    2 days ago











  • The main goal is to get this script running: #!/bin/bash ssh -v -o ConnectTimeout=10 -t user@serv.com while true; do date > /tmp/sdown.txt ; ping -i 1 -c 1 -W 1 192.168.12.116 ; sleep 1 ; if grep -q "64 bytes" ; then : else mutt -s "Device Down!" email@account.com < /tmp/sdown.txt ; sleep 10 ; fi done But in the server I'm getting "Network Unreachable" from ping reply!

    – Vasconcelos1914
    2 days ago


















0















Trying here to perform some tests on a device in a remote network.



Already managed to do it using SSH between client and server, then ping command, but thought if there wasn't better way to do it.



ssh -o ConnectTimeout=5 -t email@addr.com "ping -i 1 -c 1 -W 1 192.168.12.115 > /tmp/ping.txt"



Any sugestion?



Follows diagram of current situation.
Current Diagram










share|improve this question




















  • 1





    "Better" in what sense. Your current command leaves the ping.txt file on the server. Is that where you want it? If not, then just ssh ... "ping ..." >/tmp/ping.txt to save it on the client.

    – Kusalananda
    2 days ago













  • Somehow faster, don't know! Would be SSH the most efficient way to keep pinging a device in a remote network every 5secs? Isn't there a command that would do it more efficiently? And yes, I'd prefer to keep the ping.txt file in the server for now! Maybe later I'd remove it, don't know!

    – Vasconcelos1914
    2 days ago






  • 1





    If you want to ping it efficiently every 5 seconds, you would not connect with ssh every five seconds, but connect (once) and then use ping -i 5 -c 0 (or without the -c option, depending on what ping implementation you are using). I'm not posting this as a solution as I don't know whether it solves any problem.

    – Kusalananda
    2 days ago













  • I believe yes, it does solves the problem, if you're saying that it is currently the best way. But is there no problem in keeping an active ssh connection between server/client?

    – Vasconcelos1914
    2 days ago











  • The main goal is to get this script running: #!/bin/bash ssh -v -o ConnectTimeout=10 -t user@serv.com while true; do date > /tmp/sdown.txt ; ping -i 1 -c 1 -W 1 192.168.12.116 ; sleep 1 ; if grep -q "64 bytes" ; then : else mutt -s "Device Down!" email@account.com < /tmp/sdown.txt ; sleep 10 ; fi done But in the server I'm getting "Network Unreachable" from ping reply!

    – Vasconcelos1914
    2 days ago














0












0








0








Trying here to perform some tests on a device in a remote network.



Already managed to do it using SSH between client and server, then ping command, but thought if there wasn't better way to do it.



ssh -o ConnectTimeout=5 -t email@addr.com "ping -i 1 -c 1 -W 1 192.168.12.115 > /tmp/ping.txt"



Any sugestion?



Follows diagram of current situation.
Current Diagram










share|improve this question














Trying here to perform some tests on a device in a remote network.



Already managed to do it using SSH between client and server, then ping command, but thought if there wasn't better way to do it.



ssh -o ConnectTimeout=5 -t email@addr.com "ping -i 1 -c 1 -W 1 192.168.12.115 > /tmp/ping.txt"



Any sugestion?



Follows diagram of current situation.
Current Diagram







networking






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 2 days ago









Vasconcelos1914Vasconcelos1914

638 bronze badges




638 bronze badges











  • 1





    "Better" in what sense. Your current command leaves the ping.txt file on the server. Is that where you want it? If not, then just ssh ... "ping ..." >/tmp/ping.txt to save it on the client.

    – Kusalananda
    2 days ago













  • Somehow faster, don't know! Would be SSH the most efficient way to keep pinging a device in a remote network every 5secs? Isn't there a command that would do it more efficiently? And yes, I'd prefer to keep the ping.txt file in the server for now! Maybe later I'd remove it, don't know!

    – Vasconcelos1914
    2 days ago






  • 1





    If you want to ping it efficiently every 5 seconds, you would not connect with ssh every five seconds, but connect (once) and then use ping -i 5 -c 0 (or without the -c option, depending on what ping implementation you are using). I'm not posting this as a solution as I don't know whether it solves any problem.

    – Kusalananda
    2 days ago













  • I believe yes, it does solves the problem, if you're saying that it is currently the best way. But is there no problem in keeping an active ssh connection between server/client?

    – Vasconcelos1914
    2 days ago











  • The main goal is to get this script running: #!/bin/bash ssh -v -o ConnectTimeout=10 -t user@serv.com while true; do date > /tmp/sdown.txt ; ping -i 1 -c 1 -W 1 192.168.12.116 ; sleep 1 ; if grep -q "64 bytes" ; then : else mutt -s "Device Down!" email@account.com < /tmp/sdown.txt ; sleep 10 ; fi done But in the server I'm getting "Network Unreachable" from ping reply!

    – Vasconcelos1914
    2 days ago














  • 1





    "Better" in what sense. Your current command leaves the ping.txt file on the server. Is that where you want it? If not, then just ssh ... "ping ..." >/tmp/ping.txt to save it on the client.

    – Kusalananda
    2 days ago













  • Somehow faster, don't know! Would be SSH the most efficient way to keep pinging a device in a remote network every 5secs? Isn't there a command that would do it more efficiently? And yes, I'd prefer to keep the ping.txt file in the server for now! Maybe later I'd remove it, don't know!

    – Vasconcelos1914
    2 days ago






  • 1





    If you want to ping it efficiently every 5 seconds, you would not connect with ssh every five seconds, but connect (once) and then use ping -i 5 -c 0 (or without the -c option, depending on what ping implementation you are using). I'm not posting this as a solution as I don't know whether it solves any problem.

    – Kusalananda
    2 days ago













  • I believe yes, it does solves the problem, if you're saying that it is currently the best way. But is there no problem in keeping an active ssh connection between server/client?

    – Vasconcelos1914
    2 days ago











  • The main goal is to get this script running: #!/bin/bash ssh -v -o ConnectTimeout=10 -t user@serv.com while true; do date > /tmp/sdown.txt ; ping -i 1 -c 1 -W 1 192.168.12.116 ; sleep 1 ; if grep -q "64 bytes" ; then : else mutt -s "Device Down!" email@account.com < /tmp/sdown.txt ; sleep 10 ; fi done But in the server I'm getting "Network Unreachable" from ping reply!

    – Vasconcelos1914
    2 days ago








1




1





"Better" in what sense. Your current command leaves the ping.txt file on the server. Is that where you want it? If not, then just ssh ... "ping ..." >/tmp/ping.txt to save it on the client.

– Kusalananda
2 days ago







"Better" in what sense. Your current command leaves the ping.txt file on the server. Is that where you want it? If not, then just ssh ... "ping ..." >/tmp/ping.txt to save it on the client.

– Kusalananda
2 days ago















Somehow faster, don't know! Would be SSH the most efficient way to keep pinging a device in a remote network every 5secs? Isn't there a command that would do it more efficiently? And yes, I'd prefer to keep the ping.txt file in the server for now! Maybe later I'd remove it, don't know!

– Vasconcelos1914
2 days ago





Somehow faster, don't know! Would be SSH the most efficient way to keep pinging a device in a remote network every 5secs? Isn't there a command that would do it more efficiently? And yes, I'd prefer to keep the ping.txt file in the server for now! Maybe later I'd remove it, don't know!

– Vasconcelos1914
2 days ago




1




1





If you want to ping it efficiently every 5 seconds, you would not connect with ssh every five seconds, but connect (once) and then use ping -i 5 -c 0 (or without the -c option, depending on what ping implementation you are using). I'm not posting this as a solution as I don't know whether it solves any problem.

– Kusalananda
2 days ago







If you want to ping it efficiently every 5 seconds, you would not connect with ssh every five seconds, but connect (once) and then use ping -i 5 -c 0 (or without the -c option, depending on what ping implementation you are using). I'm not posting this as a solution as I don't know whether it solves any problem.

– Kusalananda
2 days ago















I believe yes, it does solves the problem, if you're saying that it is currently the best way. But is there no problem in keeping an active ssh connection between server/client?

– Vasconcelos1914
2 days ago





I believe yes, it does solves the problem, if you're saying that it is currently the best way. But is there no problem in keeping an active ssh connection between server/client?

– Vasconcelos1914
2 days ago













The main goal is to get this script running: #!/bin/bash ssh -v -o ConnectTimeout=10 -t user@serv.com while true; do date > /tmp/sdown.txt ; ping -i 1 -c 1 -W 1 192.168.12.116 ; sleep 1 ; if grep -q "64 bytes" ; then : else mutt -s "Device Down!" email@account.com < /tmp/sdown.txt ; sleep 10 ; fi done But in the server I'm getting "Network Unreachable" from ping reply!

– Vasconcelos1914
2 days ago





The main goal is to get this script running: #!/bin/bash ssh -v -o ConnectTimeout=10 -t user@serv.com while true; do date > /tmp/sdown.txt ; ping -i 1 -c 1 -W 1 192.168.12.116 ; sleep 1 ; if grep -q "64 bytes" ; then : else mutt -s "Device Down!" email@account.com < /tmp/sdown.txt ; sleep 10 ; fi done But in the server I'm getting "Network Unreachable" from ping reply!

– Vasconcelos1914
2 days ago










0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f536144%2fping-test-a-device-in-remote-network%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f536144%2fping-test-a-device-in-remote-network%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...