Giter Site home page Giter Site logo

Comments (11)

NHAS avatar NHAS commented on May 15, 2024 1

Oh yeah that is super annoying for you. I'll make this configurable with 0 being disabled.

from reverse_ssh.

NHAS avatar NHAS commented on May 15, 2024

Sweet this is now on the unstable branch. The flag is --timeout, feel free to check it out (and close the issue if all is well)

from reverse_ssh.

neben avatar neben commented on May 15, 2024

Wow, that was quick! Works great, but there are still the TCPKeepAlive messages being sent every 15 seconds, apparently from both sides.

10:46:28.646856 eth0  Out ifindex 386 02:42:0a:00:00:13 ethertype IPv4 (0x0800), length 72: 10.0.0.19.3232 > 10.0.0.10.46976: Flags [.], ack 73, win 22, options [nop,nop,TS val 2087557225 ecr 66711928], length 0
10:46:28.669283 eth0  In  ifindex 386 02:42:0a:00:00:0a ethertype IPv4 (0x0800), length 72: 10.0.0.10.46976 > 10.0.0.19.3232: Flags [.], ack 105, win 3790, options [nop,nop,TS val 66713450 ecr 2087542031], length 0
10:46:28.882232 eth0  In  ifindex 386 02:42:0a:00:00:0a ethertype IPv4 (0x0800), length 72: 10.0.0.10.46976 > 10.0.0.19.3232: Flags [.], ack 105, win 3790, options [nop,nop,TS val 66713472 ecr 2087542031], length 0
10:46:28.882256 eth0  Out ifindex 386 02:42:0a:00:00:13 ethertype IPv4 (0x0800), length 72: 10.0.0.19.3232 > 10.0.0.10.46976: Flags [.], ack 73, win 22, options [nop,nop,TS val 2087557461 ecr 66713450], length 0

Is there a way to disable this like with sshd_config's TCPKeepAlive option?

from reverse_ssh.

NHAS avatar NHAS commented on May 15, 2024

Oh wild, I didnt even think of that, apparently this is a feature added in go 1.13, I think I can disable this server side. But Im not keen on modifying the client.

from reverse_ssh.

NHAS avatar NHAS commented on May 15, 2024

Sweet, --timeout should now also allow you to disable/configure that. I personally havent tested that it works, so confirmation would be good

from reverse_ssh.

neben avatar neben commented on May 15, 2024

It somehow works, but not well. The client sends two keep-alive packets at the same time, every 15 seconds, which are confirmed by the server. This looks like a bug to me.

11:00:34.866020 IP 127.0.0.1.64391 > 127.0.0.1.3232: Flags [.], ack 1134, win 6361, length 0
11:00:34.866044 IP 127.0.0.1.64391 > 127.0.0.1.3232: Flags [.], ack 1134, win 6361, length 0
11:00:34.866055 IP 127.0.0.1.3232 > 127.0.0.1.64391: Flags [.], ack 1664, win 6353, options [nop,nop,TS val 780324830 ecr 3834378403], length 0
11:00:34.866060 IP 127.0.0.1.3232 > 127.0.0.1.64391: Flags [.], ack 1664, win 6353, options [nop,nop,TS val 780324830 ecr 3834378403], length 0
11:00:49.927164 IP 127.0.0.1.64391 > 127.0.0.1.3232: Flags [.], ack 1134, win 6361, length 0
11:00:49.927192 IP 127.0.0.1.64391 > 127.0.0.1.3232: Flags [.], ack 1134, win 6361, length 0
11:00:49.927205 IP 127.0.0.1.3232 > 127.0.0.1.64391: Flags [.], ack 1664, win 6353, options [nop,nop,TS val 780339891 ecr 3834378403], length 0
11:00:49.927208 IP 127.0.0.1.3232 > 127.0.0.1.64391: Flags [.], ack 1664, win 6353, options [nop,nop,TS val 780339891 ecr 3834378403], length 0

from reverse_ssh.

NHAS avatar NHAS commented on May 15, 2024

Nah thats intended. There isnt a way of configuring this for clients, so the client still does the keep alive back to the server.

from reverse_ssh.

neben avatar neben commented on May 15, 2024

Yeah, but the question is why does it do it twice?

from reverse_ssh.

neben avatar neben commented on May 15, 2024

Nevermind, it works fine (was an issue with tcpdump counting the packets twice)! I can live with the client sending a TCPKeepAlive every 15 seconds. Thanks again for the great work!

from reverse_ssh.

NHAS avatar NHAS commented on May 15, 2024

Yeah, but the question is why does it do it twice?

Huh! Honestly I didnt even pick that up from what you sent, must be a bug in the unix kernel mac uses (or potentially a feature :P ).

In hindsight I'll make the default keepalive on the client an hour or so. Will help you reduce cost even more!

I would be keen to hear a little bit more about how you're using it, and if there is anything else you'd want.

from reverse_ssh.

NHAS avatar NHAS commented on May 15, 2024

Sweet, clients now have a 2 hour keep alive

from reverse_ssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.