33
10
I'd like to be able to setup a command to run on ssh login to a server, without needing to type it. Basically I'm looking for the ssh config file equivalent of:
ssh host command
so that all I need to type is:
ssh host
and the command gets run.
3If you put the command in your authorized_keys file it'll break things such as rsync and scp - you'll get something like this: open terminal failed: not a terminal. Also, be aware that if the command fails you'll not be able to login. I've discovered this the hard way. – John Hunt – 2015-09-18T11:32:34.237
1This is awesome, didn't know you could do this. +1 – Brian Wigginton – 2013-09-24T19:48:56.593