Anyone knows a way to pass an environment variable to a openssh command? I doubt there is a way, but who knows... I want something like this: myvar="whatever" ssh [EMAIL PROTECTED] ./bin/mycommand $myvar This would execute a command with argument "whatever". The problem is that I want to authenticate via a cryptographic key allowing only this command, i.e., the file ~/.ssh/authorized_keys of myuser at remotebox has a line command="~/bin/mycommand $myvar" <public-key> This does not work, because remotebox doesn't know about $myvar. Of course, if I could pass a variable to remotebox, the line might be just command="~/bin/mycommand" <public-key> and the ssh command would be myvar="whatever" ssh [EMAIL PROTECTED] ./bin/mycommand (the program itself would use the value of $myvar)
Any idea? -- Jorge Almeida -- gentoo-user@gentoo.org mailing list