How do I troubleshoot ssh tunnels disconnection?Secure access to remote SSH tunnelHow do you verify if an INCOMING ssh tunnel is still up and who it belongs to?Restart a specific reverse ssh tunnel?tunnelling ssh through sshlockout local logins on reverse-ssh applianceHow to do SOCKS over a reverse SSH tunnel?SSH session through jumphost via remote port forwardingReverse SSH tunnel with AutoSSHSSH hangs before login promptReverse SSH-Tunnel with Socket

Are these two graphs isomorphic? Why/Why not?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

Can I negotiate a patent idea for a raise, under French law?

How to install round brake pads

Is it possible to clone a polymorphic object without manually adding overridden clone method into each derived class in C++?

Is "cogitate" used appropriately in "I cogitate that success relies on hard work"?

Translation of 答えを知っている人はいませんでした

Finding the minimum value of a function without using Calculus

Computation logic of Partway in TikZ

I reported the illegal activity of my boss to his boss. My boss found out. Now I am being punished. What should I do?

I am the person who abides by rules, but breaks the rules. Who am I?

What is the purpose of a disclaimer like "this is not legal advice"?

Can the Witch Sight warlock invocation see through the Mirror Image spell?

Is this Paypal Github SDK reference really a dangerous site?

Cycles on the torus

ESPP--any reason not to go all in?

Rationale to prefer local variables over instance variables?

How can a demon take control of a human body during REM sleep?

Converting from "matrix" data into "coordinate" data

What is Tony Stark injecting into himself in Iron Man 3?

Is it appropriate to ask a former professor to order a book for me through an inter-library loan?

Why do phishing e-mails use faked e-mail addresses instead of the real one?

Writing text next to a table

Short scifi story where reproductive organs are converted to produce "materials", pregnant protagonist is "found fit" to be a mother



How do I troubleshoot ssh tunnels disconnection?


Secure access to remote SSH tunnelHow do you verify if an INCOMING ssh tunnel is still up and who it belongs to?Restart a specific reverse ssh tunnel?tunnelling ssh through sshlockout local logins on reverse-ssh applianceHow to do SOCKS over a reverse SSH tunnel?SSH session through jumphost via remote port forwardingReverse SSH tunnel with AutoSSHSSH hangs before login promptReverse SSH-Tunnel with Socket













2















I am using SSH tunnels launched via autossh at boot on a device installed at remote locations. Up to now everything was working fine but yesterday the connection partly went down and autossh wouldn't do its thing. And I would love to figure out what happened to prevent it ever happening again. I have to deal with SLAs and all.



Here are the details:



THE SETUP



Remote site:



-Raspbian on a raspberry pi (debian wheezy)
-Autossh running at boot connects to our server and establishes 3 ssh tunnels
Tunnel 1: regular tunnel forwarding a local port on the raspberry pi to a server in our office
Tunnel 2: reverse tunnel opens a port on our server pointing to a device on the remote network
Tunnel 3: reverse tunnel opens a port from our server's loopback (127.0.0.1) adapter pointing to the ssh port of the raspberry pi on its loopback adapter.



So basically with this setup I have to ssh in our server from which I can ssh into each remote devices.



SSH Server:



-Debian Wheezy
-No firewall/iptables on the server, we use another box for this



THE PROBLEM



Both reverse tunnels (tunnels 2 and 3) stopped working. The output of



sudo netstat -atp | grep ssh


Showed that the only port still opened was for tunnel # 1



When I killed the ssh process on the server for tunnel # 1 autossh did its thing and all tunnels were reconnected but I would prefer if I didn't have to do this.



Is it normal behavior for autossh? Does autossh have issues monitoring reverse tunnels?



SYSLOG from the remote device



Sep 7 06:25:06 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 10:24:57 remote_hostname autossh[1428]: starting ssh (count 2)
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh child pid is 24161
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 16:53:53 remote_hostname autossh[1428]: starting ssh (count 3)
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh child pid is 30541
Sep 9 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed









share|improve this question



















  • 1





    Does it give more insight to run ssh with options -v, -vv, or -vvv?

    – Volker Siegel
    Sep 9 '14 at 15:39











  • Ha ha ha... I completely forgot that autossh is just a wrapper for ssh. I checked it's help dialog for debuging option and forgot to check ssh itself. Thank you!

    – TCZ8
    Sep 10 '14 at 12:43












  • So I'll make it an answer :)

    – Volker Siegel
    Sep 10 '14 at 12:45











  • Please do! My company just stopped supplying us with free coffee... I guess my ADD brain is having issues coping hehehe thanks again!

    – TCZ8
    Sep 10 '14 at 12:47












  • Ha, ask my brain...

    – Volker Siegel
    Sep 10 '14 at 12:50















2















I am using SSH tunnels launched via autossh at boot on a device installed at remote locations. Up to now everything was working fine but yesterday the connection partly went down and autossh wouldn't do its thing. And I would love to figure out what happened to prevent it ever happening again. I have to deal with SLAs and all.



Here are the details:



THE SETUP



Remote site:



-Raspbian on a raspberry pi (debian wheezy)
-Autossh running at boot connects to our server and establishes 3 ssh tunnels
Tunnel 1: regular tunnel forwarding a local port on the raspberry pi to a server in our office
Tunnel 2: reverse tunnel opens a port on our server pointing to a device on the remote network
Tunnel 3: reverse tunnel opens a port from our server's loopback (127.0.0.1) adapter pointing to the ssh port of the raspberry pi on its loopback adapter.



So basically with this setup I have to ssh in our server from which I can ssh into each remote devices.



SSH Server:



-Debian Wheezy
-No firewall/iptables on the server, we use another box for this



THE PROBLEM



Both reverse tunnels (tunnels 2 and 3) stopped working. The output of



sudo netstat -atp | grep ssh


Showed that the only port still opened was for tunnel # 1



When I killed the ssh process on the server for tunnel # 1 autossh did its thing and all tunnels were reconnected but I would prefer if I didn't have to do this.



Is it normal behavior for autossh? Does autossh have issues monitoring reverse tunnels?



SYSLOG from the remote device



Sep 7 06:25:06 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 10:24:57 remote_hostname autossh[1428]: starting ssh (count 2)
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh child pid is 24161
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 16:53:53 remote_hostname autossh[1428]: starting ssh (count 3)
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh child pid is 30541
Sep 9 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed









share|improve this question



















  • 1





    Does it give more insight to run ssh with options -v, -vv, or -vvv?

    – Volker Siegel
    Sep 9 '14 at 15:39











  • Ha ha ha... I completely forgot that autossh is just a wrapper for ssh. I checked it's help dialog for debuging option and forgot to check ssh itself. Thank you!

    – TCZ8
    Sep 10 '14 at 12:43












  • So I'll make it an answer :)

    – Volker Siegel
    Sep 10 '14 at 12:45











  • Please do! My company just stopped supplying us with free coffee... I guess my ADD brain is having issues coping hehehe thanks again!

    – TCZ8
    Sep 10 '14 at 12:47












  • Ha, ask my brain...

    – Volker Siegel
    Sep 10 '14 at 12:50













2












2








2








I am using SSH tunnels launched via autossh at boot on a device installed at remote locations. Up to now everything was working fine but yesterday the connection partly went down and autossh wouldn't do its thing. And I would love to figure out what happened to prevent it ever happening again. I have to deal with SLAs and all.



Here are the details:



THE SETUP



Remote site:



-Raspbian on a raspberry pi (debian wheezy)
-Autossh running at boot connects to our server and establishes 3 ssh tunnels
Tunnel 1: regular tunnel forwarding a local port on the raspberry pi to a server in our office
Tunnel 2: reverse tunnel opens a port on our server pointing to a device on the remote network
Tunnel 3: reverse tunnel opens a port from our server's loopback (127.0.0.1) adapter pointing to the ssh port of the raspberry pi on its loopback adapter.



So basically with this setup I have to ssh in our server from which I can ssh into each remote devices.



SSH Server:



-Debian Wheezy
-No firewall/iptables on the server, we use another box for this



THE PROBLEM



Both reverse tunnels (tunnels 2 and 3) stopped working. The output of



sudo netstat -atp | grep ssh


Showed that the only port still opened was for tunnel # 1



When I killed the ssh process on the server for tunnel # 1 autossh did its thing and all tunnels were reconnected but I would prefer if I didn't have to do this.



Is it normal behavior for autossh? Does autossh have issues monitoring reverse tunnels?



SYSLOG from the remote device



Sep 7 06:25:06 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 10:24:57 remote_hostname autossh[1428]: starting ssh (count 2)
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh child pid is 24161
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 16:53:53 remote_hostname autossh[1428]: starting ssh (count 3)
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh child pid is 30541
Sep 9 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed









share|improve this question
















I am using SSH tunnels launched via autossh at boot on a device installed at remote locations. Up to now everything was working fine but yesterday the connection partly went down and autossh wouldn't do its thing. And I would love to figure out what happened to prevent it ever happening again. I have to deal with SLAs and all.



Here are the details:



THE SETUP



Remote site:



-Raspbian on a raspberry pi (debian wheezy)
-Autossh running at boot connects to our server and establishes 3 ssh tunnels
Tunnel 1: regular tunnel forwarding a local port on the raspberry pi to a server in our office
Tunnel 2: reverse tunnel opens a port on our server pointing to a device on the remote network
Tunnel 3: reverse tunnel opens a port from our server's loopback (127.0.0.1) adapter pointing to the ssh port of the raspberry pi on its loopback adapter.



So basically with this setup I have to ssh in our server from which I can ssh into each remote devices.



SSH Server:



-Debian Wheezy
-No firewall/iptables on the server, we use another box for this



THE PROBLEM



Both reverse tunnels (tunnels 2 and 3) stopped working. The output of



sudo netstat -atp | grep ssh


Showed that the only port still opened was for tunnel # 1



When I killed the ssh process on the server for tunnel # 1 autossh did its thing and all tunnels were reconnected but I would prefer if I didn't have to do this.



Is it normal behavior for autossh? Does autossh have issues monitoring reverse tunnels?



SYSLOG from the remote device



Sep 7 06:25:06 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 10:24:57 remote_hostname autossh[1428]: starting ssh (count 2)
Sep 8 10:24:57 remote_hostname autossh[1428]: ssh child pid is 24161
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh exited with error status 255; restarting ssh
Sep 8 16:53:53 remote_hostname autossh[1428]: starting ssh (count 3)
Sep 8 16:53:53 remote_hostname autossh[1428]: ssh child pid is 30541
Sep 9 06:25:05 remote_hostname rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="1661" x-info="http://www.rsyslog.com"] rsyslogd was HUPed






ssh ssh-tunneling sshd syslog troubleshooting






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 29 mins ago









Rui F Ribeiro

41.3k1481140




41.3k1481140










asked Sep 9 '14 at 15:03









TCZ8TCZ8

5393820




5393820







  • 1





    Does it give more insight to run ssh with options -v, -vv, or -vvv?

    – Volker Siegel
    Sep 9 '14 at 15:39











  • Ha ha ha... I completely forgot that autossh is just a wrapper for ssh. I checked it's help dialog for debuging option and forgot to check ssh itself. Thank you!

    – TCZ8
    Sep 10 '14 at 12:43












  • So I'll make it an answer :)

    – Volker Siegel
    Sep 10 '14 at 12:45











  • Please do! My company just stopped supplying us with free coffee... I guess my ADD brain is having issues coping hehehe thanks again!

    – TCZ8
    Sep 10 '14 at 12:47












  • Ha, ask my brain...

    – Volker Siegel
    Sep 10 '14 at 12:50












  • 1





    Does it give more insight to run ssh with options -v, -vv, or -vvv?

    – Volker Siegel
    Sep 9 '14 at 15:39











  • Ha ha ha... I completely forgot that autossh is just a wrapper for ssh. I checked it's help dialog for debuging option and forgot to check ssh itself. Thank you!

    – TCZ8
    Sep 10 '14 at 12:43












  • So I'll make it an answer :)

    – Volker Siegel
    Sep 10 '14 at 12:45











  • Please do! My company just stopped supplying us with free coffee... I guess my ADD brain is having issues coping hehehe thanks again!

    – TCZ8
    Sep 10 '14 at 12:47












  • Ha, ask my brain...

    – Volker Siegel
    Sep 10 '14 at 12:50







1




1





Does it give more insight to run ssh with options -v, -vv, or -vvv?

– Volker Siegel
Sep 9 '14 at 15:39





Does it give more insight to run ssh with options -v, -vv, or -vvv?

– Volker Siegel
Sep 9 '14 at 15:39













Ha ha ha... I completely forgot that autossh is just a wrapper for ssh. I checked it's help dialog for debuging option and forgot to check ssh itself. Thank you!

– TCZ8
Sep 10 '14 at 12:43






Ha ha ha... I completely forgot that autossh is just a wrapper for ssh. I checked it's help dialog for debuging option and forgot to check ssh itself. Thank you!

– TCZ8
Sep 10 '14 at 12:43














So I'll make it an answer :)

– Volker Siegel
Sep 10 '14 at 12:45





So I'll make it an answer :)

– Volker Siegel
Sep 10 '14 at 12:45













Please do! My company just stopped supplying us with free coffee... I guess my ADD brain is having issues coping hehehe thanks again!

– TCZ8
Sep 10 '14 at 12:47






Please do! My company just stopped supplying us with free coffee... I guess my ADD brain is having issues coping hehehe thanks again!

– TCZ8
Sep 10 '14 at 12:47














Ha, ask my brain...

– Volker Siegel
Sep 10 '14 at 12:50





Ha, ask my brain...

– Volker Siegel
Sep 10 '14 at 12:50










1 Answer
1






active

oldest

votes


















1














You are using various ways to create log output,

but do not mention the most important ones:



The command ssh itself has a "verbose" option -v.

And more interesting, it also has a "verry verbose" option -vv.

Oh, and "verry verry verbose", -vvv, which may actually be too verbose!



Does it give more insight to run ssh with options -v, -vv, or -vvv?



Showing how much verbosity the options enable:



$ ssh -v localhost true |& wc -l 
56
$ ssh -vv localhost true |& wc -l
122
$ ssh -vvv localhost true |& wc -l
282





share|improve this answer
























    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%2f154614%2fhow-do-i-troubleshoot-ssh-tunnels-disconnection%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You are using various ways to create log output,

    but do not mention the most important ones:



    The command ssh itself has a "verbose" option -v.

    And more interesting, it also has a "verry verbose" option -vv.

    Oh, and "verry verry verbose", -vvv, which may actually be too verbose!



    Does it give more insight to run ssh with options -v, -vv, or -vvv?



    Showing how much verbosity the options enable:



    $ ssh -v localhost true |& wc -l 
    56
    $ ssh -vv localhost true |& wc -l
    122
    $ ssh -vvv localhost true |& wc -l
    282





    share|improve this answer





























      1














      You are using various ways to create log output,

      but do not mention the most important ones:



      The command ssh itself has a "verbose" option -v.

      And more interesting, it also has a "verry verbose" option -vv.

      Oh, and "verry verry verbose", -vvv, which may actually be too verbose!



      Does it give more insight to run ssh with options -v, -vv, or -vvv?



      Showing how much verbosity the options enable:



      $ ssh -v localhost true |& wc -l 
      56
      $ ssh -vv localhost true |& wc -l
      122
      $ ssh -vvv localhost true |& wc -l
      282





      share|improve this answer



























        1












        1








        1







        You are using various ways to create log output,

        but do not mention the most important ones:



        The command ssh itself has a "verbose" option -v.

        And more interesting, it also has a "verry verbose" option -vv.

        Oh, and "verry verry verbose", -vvv, which may actually be too verbose!



        Does it give more insight to run ssh with options -v, -vv, or -vvv?



        Showing how much verbosity the options enable:



        $ ssh -v localhost true |& wc -l 
        56
        $ ssh -vv localhost true |& wc -l
        122
        $ ssh -vvv localhost true |& wc -l
        282





        share|improve this answer















        You are using various ways to create log output,

        but do not mention the most important ones:



        The command ssh itself has a "verbose" option -v.

        And more interesting, it also has a "verry verbose" option -vv.

        Oh, and "verry verry verbose", -vvv, which may actually be too verbose!



        Does it give more insight to run ssh with options -v, -vv, or -vvv?



        Showing how much verbosity the options enable:



        $ ssh -v localhost true |& wc -l 
        56
        $ ssh -vv localhost true |& wc -l
        122
        $ ssh -vvv localhost true |& wc -l
        282






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 15 '14 at 1:01

























        answered Sep 10 '14 at 12:49









        Volker SiegelVolker Siegel

        11k33261




        11k33261



























            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%2f154614%2fhow-do-i-troubleshoot-ssh-tunnels-disconnection%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

            Frič See also Navigation menuinternal link

            Identify plant with long narrow paired leaves and reddish stems Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?What is this plant with long sharp leaves? Is it a weed?What is this 3ft high, stalky plant, with mid sized narrow leaves?What is this young shrub with opposite ovate, crenate leaves and reddish stems?What is this plant with large broad serrated leaves?Identify this upright branching weed with long leaves and reddish stemsPlease help me identify this bulbous plant with long, broad leaves and white flowersWhat is this small annual with narrow gray/green leaves and rust colored daisy-type flowers?What is this chilli plant?Does anyone know what type of chilli plant this is?Help identify this plant

            fontconfig warning: “/etc/fonts/fonts.conf”, line 100: unknown “element blank” The 2019 Stack Overflow Developer Survey Results Are In“tar: unrecognized option --warning” during 'apt-get install'How to fix Fontconfig errorHow do I figure out which font file is chosen for a system generic font alias?Why are some apt-get-installed fonts being ignored by fc-list, xfontsel, etc?Reload settings in /etc/fonts/conf.dTaking 30 seconds longer to boot after upgrade from jessie to stretchHow to match multiple font names with a single <match> element?Adding a custom font to fontconfigRemoving fonts from fontconfig <match> resultsBroken fonts after upgrading Firefox ESR to latest Firefox