Comments (11)
Furthermore, now that the XPipe 1.5 staging version supports importing hosts from ssh configs, would such a solution work for you: https://unix.stackexchange.com/a/454743
from xpipe.
So I will see what I can come up with in the future. Out of all the things that I currently have on my to do list, this isn't very high right now though.
from xpipe.
Ok, so just that I understand the problem correctly, you messed up your DNS and want to use IPs instead of host names for your ssh connections?
But you don't want change manually between IPs and host names in the configuration window and instead want to be able to provide fallback IPs/host names that will be tried when the previous ones don't work? I.e. instead of having a single text field for the host entry, have one that allows to provide multiple entries?
from xpipe.
You understood my request correctly.
That's intersting, I can play with it - this does make configuration more cumbersome. Compared to my idea where XPipe keeps track of the latest IP address, and auto-updates it.
Thanks for the quick response, and for the tip.
from xpipe.
The technical implementation for such a thing would be quite difficult:
- How do we check whether DNS resolution fails (which command) on all supported operating systems?
- How do we define a failure? What if the DNS points to a wrong server which can be resolved? What if it points to the correct server but that one is currently not reachable via SSH?
Now I haven't tested this, but due to XPipe just straight a passing your configured command to your shell, you can in theory embed shell expressions into your hostname. If you are using a posix shell and pass $(...)
in the host argument, this can dynamically evaluate the expression. So if you use such an expression to evaluate to either the host name if it can be resolved or the IP otherwise, this should properly build the ssh command and achieve what you're looking for.
from xpipe.
...you can in theory embed shell expressions into your hostname...
That's a problematic idea - sanitation of values is an important security topic, and allowing that should be diswaded.
I get your point, about the comlpexity, and I thank you for entertaining the notion.
How about just fetching an IP address if the 'additional addresses' is empty.
No need for a specific command, just use a Java call.
This should remove the complexity of detection later on.
from xpipe.
I understand your concern about the sanitation of inputs. The reason this is currently allowed is that the user should be in full control over what values are entered in there. If somehow an adversary is able to modify your own configuration and embed expressions in it, you might have bigger problems. All inputs are properly sanitized at other locations, e.g. the file browser, I just left that in to give users more flexibility.
The problem with DNS resolution via a Java method is that it would always resolve that using your local configuration. If your SSH connections have set a proxy/gateway, that DNS resolution does not match the one on the proxy machine.
It would be nice if SSH would be able to provide the IP it last resolved when connecting via a hostname, but I don't think it can tell you that.
from xpipe.
I see your point. So if you chose this, you'll need to implement at least 3 separate methods:
Linux - dig or nslookup
Windows - powershell resolve-dnsname or nslookup.ex
MacOS - #... I have no experience#
figuring out what is avialable, parsing the output - and dealing with this as these systems evolve.
Better drop the auto-detection part.
from xpipe.
Really appreciate you entertaining my idea, even on a low priority.
Thanks for making this tool a thing.
from xpipe.
I was thinking about adding a system information button for connections to display basic information, including things like the IP address. That information would be kept from the last successful connection attempt, this would also make solving your problem easier as you then could just copy that IP and it temporarily use it as the host address for the connection. Would that work?
from xpipe.
yes, that's not bad at all. Although it would still mean editing or creating a separate connection, but at least the detail is preserved somewhere. Thanks for thinking about solving this.
from xpipe.
Related Issues (20)
- The argument 'pwsh' is not recognized as the name of a script file HOT 10
- Modifiable ConnectionTimeout HOT 3
- About version HOT 7
- Confused the .ssh/config importer HOT 9
- Tree/groups of connections HOT 4
- Error: Set-PSReadLineOption: command not found HOT 2
- Auth Problem when using the google-authenticator pam module HOT 9
- VSCode version support HOT 3
- Concern about closed source plugins HOT 4
- Create a docker image with web interface HOT 4
- Support for read-only file systems
- Add ability to open multiple tabs in kitty terminal HOT 1
- OPNSense terminal not handled HOT 9
- Feature Request: Connection agent to manage multiple connections on remote device HOT 4
- Unable to open Windows Terminal HOT 3
- Unable to launch terminal Tabby HOT 7
- Adding SSH connection to Cisco Device fails. HOT 12
- Feature Request - PIV auth (Smart card) Hardware tokens (Yubikey) HOT 16
- left connection bar is not resizable HOT 2
- xpipe stopped working after linux update HOT 5
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 xpipe.