4 ms·
I had no idea .ssh/config could do arbitrary command exec. Neat (and scary!) :)
by 0x0 4y ago
I had no idea .ssh/config could do arbitrary command exec. Neat (and scary!) :)
- ape4 4y agoYeah seems like there should be an option to disable that
- blueflow 4y agoIts not increasing any attack surface, or can you construct a situation where it could be exploited?
- HvTfMhdTZ8Lths6 4y agoWell, setups using forced commands are relatively common with SSH (case in point: probably any Git server you've ever accessed over SSH); if one of those setups also allowed their user to specify ssh_config rules without realizing that Match can exec things there'd be a problem. I think that's a bit of a stretch though.
- blueflow 4y agoThe ForcedCommand is server-side, the Match exec from ssh_config is done client-side. The server has no way to enforce which commands the client can run locally.