Comments (5)
@davrodpin I will go ahead and take a look at this and see how far along i can get. Thanks for the detailed explanation of what you would like to see happen with this change. Appreciate it very much! I'll keep you posted if i have questions and on progress that i make.
from mole.
Hi @ei8fdb,
This behaviour (auto reconnect if connection to SSH server drops) is something that should be default?
Yes, both Server Reconnect
and Keep Alive
should be enabled by default.
We want optional arguments for the amount of time mole
will wait before trying to connect again and how many attempts mole
should make once the server disconnects before giving up.
from mole.
I'm pretty new to open source but i'm willing to give this one a shot. Since its Hacktober! Any pointers on getting started with adding a feature like this I've worked with Go's crypto/ssh library a bit.
Looks like adding a Optional Flag to indicate consecutive attempts is a criteria for this before it times out completely. Is there any other criteria you can think of? Thanks!
from mole.
I'm pretty new to open source but i'm willing to give this one a shot. Since its Hacktober! Any pointers on getting started with adding a feature like this I've worked with Go's crypto/ssh library a bit.
Looks like adding a Optional Flag to indicate consecutive attempts is a criteria for this before it times out completely. Is there any other criteria you can think of? Thanks!
Thank you very much for considering contributing to the project, @jessebarton. And don't worry about being new to open source, this is my first project 😝
The more I think about this feature, the more I see a need for two different requirements:
- Server Reconnect: the app should try to reconnect to the ssh server whenever the connection gets dropped.
- Keep Alive: the app should keep sending synthetic packets to the ssh server to not allow the connection to time out.
Let's focus this issue on 1 and I will cover 2 on another one #26.
Every time the connection to the ssh gets dropped by any reason, the app should try to reconnect after some period of time.
By default, the reconnect interval should be 10 seconds
and user could use the -reconnect-after
flag to override this value.
Take a look on Tunnel#Start().
There is a select at the end of the method that is waiting for an error. Any problem while connecting to either the ssh server or the remote service is handled there. That might be the place to handle the retry logic, instead of letting the app to end.
from mole.
(Probably a silly question, so....)
This behaviour (auto reconnect if connection to SSH server drops) is something that should be default?
Thinking about all my SSH tunnels if any drop, I want them to reconnect. (A good usability heuristic - have sane defaults that make sense to users - users would want their SSH tunnel to reconnect if it drops. I assume.)
Hence - there probably isn't a need for this to be configurable in a UI? The most I'd expect is a configurable:
- auto reconnect if connection drops
type-option?
from mole.
Related Issues (20)
- logon using privatekey denied. error ssh: handshake failed: knownhosts: key is unknown HOT 1
- error runtime: bad pointer in frame github.com/konsorten/go-windows-terminal-sequences HOT 1
- Fix `add alias` help
- request for ENHANCEMENT: [github] xanzy/ssh-agent and/or passphrases for private keys ... HOT 3
- Feature request: unix socket forwarding
- Key mismatch HOT 8
- Missing `config` attribute on `<alias>.toml` file causing application to fail HOT 2
- New feature: SOCKS support
- ProxyCommand parameter in config not used, cannot use ssh proxy jump host HOT 1
- Can't get running configuration of detached instance HOT 1
- [Feature Request] Support aarch64 architecture for Raspberry Pi HOT 1
- [Feature Request] Support Remote Forwarding HOT 1
- [Feature Request] alias for remote port forwarding HOT 1
- Find another way to find is key is encrypted
- --detach not working HOT 8
- Mole not support ssh Include configuration files
- Show instances is not returning anything
- How to
- Ignoring IdentityAgent from SSH config and -A CLI option
- Skipping private key with passphrase without chance to enter it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mole.