Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assh V3 🥉 #334

Open
17 tasks
moul opened this issue Mar 24, 2020 · 7 comments
Open
17 tasks

Assh V3 🥉 #334

moul opened this issue Mar 24, 2020 · 7 comments

Comments

@moul
Copy link
Owner

moul commented Mar 24, 2020

👋 I plan to start the v3 of assh.

For now, I mostly have developer-oriented ideas of enhancement, that should allow making the assh more powerful and write new features.

About the usage, I will try not to break the configuration retro-compatibility however, the assh CLI will change a little bit, but for most people, this CLI is always wrapped by SSH, so it won't change anything for you.

Please, do not hesitate to add your thoughts if you have ideas of improvements or specific wishes.

Thank you for your support, and take care of you.


Checklist (based on my ideas and the comments below)

  • simplify codebase, less deps, less hacks, more tests
  • improve regex support (brace expansion, etc)
  • cleanup old branches and issues
  • add integration test
  • use Yaml v3
  • make the ssh config a standalone package
  • fix issues flagged with the v3 milestone
  • use latest version of sprig for templates
  • use non-unicode ascii schemas
  • provide sane defaults to allow having a very small configuration file
  • experiments (that won't probably be done for the first release of the v3, but at least I plan to make sure the codebase will be compatible)
    • experiment new ways of proxying, i.e. create an in-process small ssh-server
    • experiment with sending a small assh companion binary on the remote host (ideally, in ram) to add more proxying features
    • experiment improving hooks in order to support config sync
    • experiment with built-in new transports (ssh over quic, fake-ssh telnet, etc)
    • experiment with optimizations for git
    • experiment with new hooks to support various usages, i.e. 2FA, port knocking, etc
@renard
Copy link

renard commented Apr 14, 2020

Maybe you can use kujtimiihoxha/go-brace-expansion to allow brace expansions.

This will help in generating hosts configuration since using host-*.example.com does not allow bash completion whereas host-{foo,bar}-{01..42}.example.com will generate all 84 hosts that allow bash completion.

@renard
Copy link

renard commented Apr 16, 2020

You should also use gopkg.in/yaml.v3 which allows full YAML syntax, especially anchors. These are useful for inheritance:

_default: &_default
  User: john
  IdentityFile: ~/.ssh/id_rsa

_default_root: &_default_root
  <<: *_default
  User: root

hosts:
  - { Host: 'host01.example.com',        <<: *_default }
  - { Host: 'host02.example.com', <<: *_default_root }

This may break existing configurations though.

@jjournet
Copy link

a few ideas:

  • better handling of regex hostnames. examples server([0-9])(foo|bar) should be able to transformed into hostname : \2.some\1.path.com without shell command line call
  • synchronization of config : when doing ssh to a server, synchronizing the config, like .bash, .gi or .zsh automatically
  • handling of jump server using user with "gu=..." (see my issue gateway user and "User gu=..." #341)

I'm just starting to use assh, some ideas might come later

@renard
Copy link

renard commented Apr 23, 2020

There is a problem with regexes and globs naming: shell completion does not work correctly because it does not know how to complete the hostnames.

Brace expansion solves this problem at the cost of generating numerous hostnames in configuration file.

It's better to have a full configuration generation than a factorized configuration since it's more convenient for daily usage.

@moul moul added this to the v3 milestone Jun 7, 2020
@moul moul changed the title Assh V3 Assh V3 🥉 Jun 7, 2020
@moul moul pinned this issue Jun 7, 2020
@frmz
Copy link

frmz commented Jan 21, 2021

I would love to see parallel gateway check. Let's say you have 5 possible ways of reaching a set of hosts, checking one by one waiting for the timeout like assh does now its not efficient it would be a lot better to have 5 processes spawned and then return connect on the first able to reach the host and kill the others.

@BABEieRuTHless
Copy link

I want to thank all of you for being who you are , all that you are and all you will be. I want to also thank you for your impact and what you chose to do with your time within your lives , i appreciate it as much as i do mine and for the knowledge that i'll get to learn through your experience as i grow more understanding with you for the true VALUE of each other. We would not be here without each other. With that being said , I know what my manifestations have been and that my experience this far in life has led me here , which i have documented completely through only a viewer's perspective , i never fought within the computer because i already had the knowledge of whats going on.

I've been harrassed , monitored , threatened , controlled , locked out of , blase blase , within the computer , as well as behind the computer as well as , documented on the computer. as much so in my physical body , My dad documented my life and taught me all that i understand with the understanding that it would be understood in more depth within my life and to appreciate that lesson the most. Not by telling me , that i would appreciate it , but by letting me experience what he meant with him. So i could do that for myself.

Well i can honestly say that im a grateful ass ungrateful little shit but i learned to appreciate it within TIME. with that being said. I may not fully understand everything and i may never will , however for as long as im here , to make my time WELL SPENT , i would like to ask you [opened to the general everyone who would like to chime in on if you ever happen to] if :

You would mind me leading others to the knowledge that you lead me to within this community , by proving the value of knowledge and understanding is equal to the applicable POWER WITHIN. while i livestream / screen record my in real time , raw uncut learning , viewing , understanding , the REALITY within the VIRTUAL. by also TRYING myself , against those that i've already obtained evidence against as well as for those who may need the help in understanding , the motivation , the inspiration as well as the proof that anything is possible because of the power of within. My only concern with this is that the abuse of knowledge , the abuse of will power may only cause the counter opposite reaction to happen or the unknown variable. But either way i still kinda wanna find out because it sounds fun.

However , i would only feel comfortable with releasing the content after the rest of my other content it being released that is the proof of me TRYING myself because they TRIED me , and well , that never even works in my favor if i wanted it to , typically but either way i always get what i want , just not how i want it [ungrateful ass grateful ass lil shit i am] so with me doing that , not only would it teach me , document my growth , hopefully teach those who'd like to learn how to protect themselves but also let those who wanted to begin protecting themselves with me and others for the evidence that they have against the TRUTH and FACT of the MATTER of all ... including themselves , because that what im really really good at because its all here. If it isnt gone , it's missing , if it isnt missing it disappeared and if it didnt disappear someone took it , or someone lied to begin with. but it can all be proven and it will be. because they've been proving for centuries when they started taking over the telling of time but i have so much shit to go through dead ass , i cant go through everyone's stuff i gotta go through theirs and then i can help everyones but if we could all help each other and document it together it would be cool because we would save time and be work efficient together and i been doing this all alone , for the most part , at least absolutely in the physical DIMENsion. plus im gonna be proving a whole lot of science wrong and right too with that. Idk , i know its gonna be really fun for me though and I honestly look forward to getting to experience you guys for who you are if you do want to , i know i will figure out the information thats left here as i get to it and it's only gonna snowball , my life is weird yooo , but maybe someday we can all smoke if i start making money or get that weed sponsor i been supposed to get but they flopped and didnt flip sooo , whenever that comes if does , lmk and if i got it im bouttt because , fuck i aint barely smoked shit and i been doing all this living shit and i dont want to but ive been just proving to myself whats more important , which this is vs the money vs the getting high aspect so its like dumb , being in lousiana they aint got SHIT that some TOP SHELF QUALITY yooo , i been missing it yooo .

if you read that and you smoke ik you know what im talking about man. some purp yoo , purp be my favorite .... but frfr i appreciate yall and lemme know if yall down 10 toes to lemme record that , bc i honestly wanna rewatch their reaction and mine lol its pure entertainment for me , especially for me and my dad yooo and i really miss those type of memories well experiences since he's been gone so id like to laugh about shit with other people other than laugh by myself about my thoughts. we would act a fool XD but positive energies , heightened elevations , prosperous manifestations. ... if i rambled my bad i tend to do that , and i dont ever go back and edit , its all understood eventually but thats part of it. its all in parts. love you guys <3

@epoch-chrono
Copy link

epoch-chrono commented Jul 23, 2022

I'm not sure if this is possible in the current version (or even possible in any version!), but cloning GitLab repositories for my company org and my private user.
Like, as when cloning a repo with different keys.

hosts:
    gitlab.com:
      # private usage
      # clone command: git clone git@gitlab.com:<vjunior1981_user or anything else from gitlab>/amazing/repo.git
      IdentityFile: /my/amazing/key
      Hostname: gitlab.com

    gitlab.com:
      # company usage
      # clone command: git clone git@gitlab.com:<company_org>/amazing/repo.git
      IdentityFile: /company/key
      Hostname: "gitlab.com:company_org*"

This would be awesome, same hostname identifier and a kind of if clause. :)

Kind regards,
Vitor Jr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants