Execute a client-side command when the connection is established.
Section: Useful Options
Run a local command after connect
bash
bash
ssh -o PermitLocalCommand=yes -o LocalCommand='echo connected to %n' user@example.comExplanation
Execute a client-side command when the connection is established.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Useful Options