Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2007 18:34:31 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        freebsd-current@FreeBSD.org
Subject:   sshd and a "command" option at ~/.ssh/authorized_keys
Message-ID:  <89849832@srv.sem.ipt.ru>

next in thread | raw e-mail | index | archive | help
Hi!


With 'command="/bin/echo You are $USER!"' at ~/.ssh/authorized_keys:
$ ssh <the_host>
You are duser! <-- is'a real username

But with 'command="/bin/echo You invoked $SSH_ORIGINAL_COMMAND!"':
$ ssh <the_host>
You invoked !
^^^^^^^^^^^^^
Is this a bug? (Yes, I know about security issues etc.)

If I use a script at the "command", the invoked command is shown.
The man page says:
-----
   The command originally supplied
   by the client is available in the SSH_ORIGINAL_COMMAND environ-
   ment variable.  Note that this option applies to shell, command
   or subsystem execution.
-----

The system is (from Sep 02):
$ uname -srm
FreeBSD 7.0-CURRENT amd64

Thanks!


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89849832>