naksyn / Pyramid

a tool to help operate in EDRs' blind spots
Apache License 2.0
638 stars 71 forks source link

socks disconnecting #6

Closed avg-socks-enjoyer closed 1 year ago

avg-socks-enjoyer commented 1 year ago

Hi. Could you help me please. I testing your scripts and found that socks5 tunnel just dropping after few hours of connection. On testing machine there's no problem with process, all works. netstat -an shows ssh connection established, but at server process sshd just dying after some time. I tried to edit flags at source of .py file, added keep interval at server, tcp alive and etc but nothing helped me. Confused with this.

naksyn commented 1 year ago

Hi, the script does not implement any keepalive and by default paramiko sets it to off Keeping SSH up for hours might require to set keepalive on both client and server. Client-side, you could add set_keepalive(interval) in the Pyramid script, and tune the server ssh config like in this post. Let me know if this helped

avg-socks-enjoyer commented 1 year ago

Thx, got it. I will try it now and will see if it's will die. Will answer later.

Also thx for project :D

naksyn commented 1 year ago

No problem! glad you like the project

avg-socks-enjoyer commented 1 year ago

It works for 14 hours now, so i think it will work. I will close it, TY for help!