SSH Config: How to Stop Repeating a Setting/Have it in the Wildcard Host?
1
vote
1
answer
40
views
I have a repeating setting
remoteCommand
, that I'd like to add in the wild card host if possible.
Here is a truncated snippet:
host container-server
host container-1
remoteCommand docker exec -it containerHostname-01 bash
host container-2
remoteCommand docker exec -it containerHostname-02 bash
host container-2
remoteCommand docker exec -it containerHostname-02 bash
host *
user
requestTTY yes
identityFile ~/.ssh/key
strictHostkeyChecking no
userKnownHostsFile /dev/null
preferredAuthentications publicKey
hostname
As containerHostname-0
all differ by an integer, I'm assuming it can't be done, and I've researched for days and came back with nothing, so is it possible?
Asked by Nickotine
(554 rep)
Dec 14, 2023, 09:45 PM
Last activity: Dec 14, 2023, 11:06 PM
Last activity: Dec 14, 2023, 11:06 PM