Hi ssh devs, I'm wondering about the possibility of adding a "RemoteCommand" option in the ssh config file, which is what -t does in the command line. I personally need this to run a small user background process on ssh login, and it makes more sense to me to put this in the config file since I do some port forwarding too for this process. I did some research and there have been some similar requests over the years so I think there is a need: - http://serverfault.com/questions/56086/ssh-how-to-include-t-command-in-the-ssh-config-file - http://unix.stackexchange.com/questions/214004/ssh-config-auto-execute-remote-command - http://superuser.com/questions/124101/run-a-remote-command-using-ssh-config-file - http://unix.stackexchange.com/questions/91747/ssh-config-specify-command-to-be-executed-on-the-remote-machine-upon-login What do you think? Cheers, Simon
Darren Tucker
2015-Oct-27 04:00 UTC
possibility of a RemoteCommand option in the ssh config file
On Tue, Oct 27, 2015 at 1:57 PM, Simon <simonzack at gmail.com> wrote:> Hi ssh devs, > > I'm wondering about the possibility of adding a "RemoteCommand" option in > the ssh config file, which is what -t does in the command line.-t just requests that the server assign a pseudoterminal for whatever command you later give it, and it already has an equivalent in ~/.ssh/config ("RequestTTY yes").> I personally need this to run a small user background process on ssh login, > and it makes more sense to me to put this in the config file since I do some > port forwarding too for this process.It's not clear to me what you're trying to do. If you're running a small process in the background, wouldn't the shell startup script be the right place to put it? -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.