assh icon indicating copy to clipboard operation
assh copied to clipboard

BeforeConfigWrite and AfterConfigWrite does not seem to work

Open tomposmiko opened this issue 3 years ago • 1 comments

It's like ignored:

assh.yml

---
defaults:
  hooks:
    BeforeConfigWrite:
      - 'exec cat ~/.ssh/tompos-config'

build:

$ assh config build
# This file was automatically generated by assh vn/a (n/a)
# on 2021-04-14 22:48:12 +0200 CEST, based on ~/.ssh/assh.yml
#
# more info: https://github.com/moul/assh

# host-based configuration
# global configuration
Host *
  ProxyCommand /home/tompos/go/bin/assh connect --port=%p %h

If I add other default options, they work, yml files can be included, just this one is missing. What I want to achieve is basically adding another ssh config file. What do I miss here?

tomposmiko avatar Apr 14 '21 20:04 tomposmiko

I found that if I disable the wrapper alias ssh="assh wrapper ssh --" then both BeforeConfigWrite and AfterConfigWrite are working, if I enabled it, then only OnConnect and OnDisconnect will work. No idea why, but this works for me.

thelittlerocket avatar Jul 01 '21 12:07 thelittlerocket