There is a remote host, where I'd like to run a specific script every time I connect to it via ssh. Where should I put the file to be run automatically?
|
feedback
|
|
From the ssh man page:
| |||
|
feedback
|
|
Add it to the authorized-keys file for the key you are connecting with (setup a private key auth as well) and use the command field in the file, for more info do a "man authorized-keys" to see what else you can setup. | |||
|
feedback
|
|
In the remote server? ssh my-remote-host /usr/local/bin/my-remote-script You can limit the ssh to run only one command with a specific key also, thus limiting the key usage. See http://pkeck.myweb.uga.edu/ssh/ for examples | ||||
|
feedback
|