Add ability to add a command as a prerequisite for SSH #8

Merged
ClashTheBunny merged 1 commit from add_ssh_prereqs into master 2022-12-01 15:53:23 -06:00
ClashTheBunny commented 2022-05-23 11:02:56 -05:00 (Migrated from github.com)

This could be used for:

  • loading a rarely used key
  • starting a VPN

Add it to a session like so:

ssh_prereqs => [
   qq( systemctl start openvpn@prod && ),
   qq( alacritty -e ssh-add ~/.ssh/prod_id_rsa ) ],
]

If it exits successfully, it goes on to start the control socket. If it
fails, it doesn't try to connect to something that's unreachable.

This could be used for: * loading a rarely used key * starting a VPN Add it to a session like so: ``` ssh_prereqs => [ qq( systemctl start openvpn@prod && ), qq( alacritty -e ssh-add ~/.ssh/prod_id_rsa ) ], ] ``` If it exits successfully, it goes on to start the control socket. If it fails, it doesn't try to connect to something that's unreachable.
ClashTheBunny commented 2022-05-23 11:08:09 -05:00 (Migrated from github.com)

This would probably pair nicely with a command to run on exit from the session that would kill the VPN and unload the SSH key.

This would probably pair nicely with a command to run on exit from the session that would kill the VPN and unload the SSH key.
zdykstra commented 2022-12-01 15:39:58 -06:00 (Migrated from github.com)

Wow. I'm incredibly sorry that I missed this pull request! I don't know why GitHub didn't send me a notification.

Wow. I'm incredibly sorry that I missed this pull request! I don't know why GitHub didn't send me a notification.
zdykstra commented 2022-12-01 15:54:16 -06:00 (Migrated from github.com)

Thank you for the feature, this is a very useful addition.

Thank you for the feature, this is a very useful addition.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
zdykstra/tmuxc!8
No description provided.