Comments (5)
I agree. Rewriting an SSH config parser doesn't make sense ;) . It would be a waste of time IMHO. If you really need to parse it you can use some Python "paramiko" functions.
The solution you provided is interesting ([email protected] in ~/.apssh/desktops), however it is not enough to replace the ~/.ssh/config, because in ~/.ssh/config you can define different private keys for a group of hosts, ProxyCommand (useful for trusted hosts) and many other useful SSH options.
What kind of library / backend do you use for apssh to run SSH commands? Do you use the SSH command or a library like libssh/paramiko? Can we add a custom options to ssh like -F for example with apssh?
from apssh.
apssh
is entirely based on asyncssh, and on asyncio
more generally
For this reason I didn't know much about paramiko
, but at first - and quick - sight it looks like this library can be easily leveraged for parsing a config file in an ssh format
this indeed opens up a lot of possibilities - too many maybe :-) so I need to prioritize here.
In a first pass I suggest to add the following minimal features:
. look into ~/.apssh
(or something else if specified with -D
) to locate target files, as I mentioned above
. opening the ssh config when found (or something else specified with -F
), and using this for a handful of supported configuration options. This of course will necessarily be a small subset of what ssh supports. I understand you'd like to see at least the following tags to be used
Hostname
User
You seem to suggest there is an ssh config option to specify private keys on a host-per-host basis, but I could not spot this one; in any case please suggest other ssh config options that could be added to this batch.
If we go down this road, there is the question of the interdependance of these two config schemes.
In the case where a name is found both in ~/.apssh
and in the ssh config file, my proposal is for the .apssh
source to take precedence.
Also both schemes could be turned off by specifying either -F /dev/null
or -D /dev/null
How would that sound ?
from apssh.
For now in version 0.2.8 I have added the search in ~/.apssh (not overridable with -D btw at this point)
As soon as you send your feedback, and esp. about locating keys on a node-per-node basis, I can go on with this feature
from apssh.
Let me add that I'd really like to try and leverage the ProxyCommand defined in ssh's config as well
apssh supports 2-hops connections through a gateway, and clearly most of the time this data is captured in such ProxyCommand's
Of course I far as I can tell this would be heuristics of some kind, as the ProxyCommand itself can be anything..
Comments/thoughts/hints are more than welcome
from apssh.
The ability to have groups has been around for a while already
I am keeping this open as a hint to use another library - paramiko ? - to read the contents of the ssh config and try to leverage that as much as possible
from apssh.
Related Issues (20)
- commands run on localnode have their otput produced in a single batch HOT 1
- apssh doesn't kill remote jobs when exiting HOT 13
- consider using a nested scheduler HOT 1
- deprecate keep_connection ? HOT 1
- SshProxy.close() on tunnelled SSH connection not closing connection on gateway HOT 1
- too many files error on multiple declaration of SshNode() (only on mac)
- os.getlogin() doesnt work HOT 2
- defining scripts using yaml HOT 1
- use commas to separate targets HOT 1
- ability to describe a gateway on a per-host basis HOT 1
- add option to just see the list of targets
- better notify failed connections HOT 1
- ColonFormatter & short names
- `appush` & `appull` HOT 3
- default behavior of {host} should be short
- harmonize specials
- new special for {line} but without a newline
- more support for LocalNode() HOT 1
- better error reporting with yaml loader
- results not properly shown in order
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 apssh.