I also have the following from the examples I mentioned:
defaults:
Hooks:
AfterConfigWrite:
# Alert me with a Desktop notification
- notify "{{.SSHConfigPath}} has been rewritten"
OnConnect:
# Alert me with a Desktop notification
- notify "New SSH connection to {{.Host.Prototype}} at {{.Stats.ConnectedAt}}."
OnDisconnect:
# write on terminal and in a Desktop notification some statistics about the finished connection
- "write SSH connection to {{.Host.HostName}} closed, {{.Stats.WrittenBytes }} bytes written in {{.Stats.ConnectionDuration}} ({{.Stats.AverageSpeed}}bps)."
- "notify SSH connection to {{.Host.HostName}} closed, {{.Stats.WrittenBytes }} bytes written in {{.Stats.ConnectionDuration}} ({{.Stats.AverageSpeed}}bps)."
I always get the "{{.SSHConfigPath}} has been rewritten" notification correctly, but I do not get the others at all.
I tested with another server that has a direct ssh connection (so no bastion) and I do get the notifications for that connection consistently.
Hello,
I'm playing around with the
Hooks
examples in https://github.com/moul/assh/blob/master/examples/readme-full-example/assh.yml and notifications on macOS 10.15.6. All our connections require a bastion host, so I do the following:I also have the following from the examples I mentioned:
I always get the "{{.SSHConfigPath}} has been rewritten" notification correctly, but I do not get the others at all. I tested with another server that has a direct ssh connection (so no bastion) and I do get the notifications for that connection consistently.
Any idea what I might be doing wrong?