I have a local script that needs to execute locally as a pre-requisite to making an ssh connection.
The script is already working, but currently users need to run the script, then make an ssh connection - two steps. I would like that to happen in one step.
Example script run, from the users perspective:
MFA Code: 12345
Success. You can now connect over ssh.
$ ssh [email protected]
Goal / Problem:
I want this script to allow user input when triggered from ssh config.
For example, this below ssh config executes the script properly, but it does not allow the user to interact and the user is never shown any stdout of the script:
Match host bastion* exec "/scripts/generate-mfa-auth.sh"
Host *local.example.com !bastion1.local.example.com
ProxyCommand ssh [email protected] -W %h:%p
Is there any way to have this script work interactively when called from ssh config?