ssh -N bypasses command="command" in authorized_keys

From: Ian! D. Allen (idallen@freenet.carleton.ca)
Date: 11/14/02


From: idallen@freenet.carleton.ca (Ian! D. Allen)
Date: Thu, 14 Nov 2002 16:52:22 +0000 (UTC)

Linux Mandrake 8.2 - openssh-3.4p1-1.1mdk

The Linux man page for sshd says, incorrectly:

   command="command"
       Specifies that the command is executed whenever this key is used
       for authentication.

This is wrong. The command="command" is only executed if they key is used
for authentication *and* you request that *some* remote command be run.
If you don't supply any command - command="command" is ignored.

Using "ssh -N" (do not run a remote command) allows me to connect
to this sshd server without running *any* command, thus avoiding the
"command=command" setting in the authorized_keys file.

Perhaps the behaviour should be fixed; at minimum, the man page should
be fixed. Who should I contact about that?

-- 
-IAN!  Ian! D. Allen   Ottawa, Ontario, Canada   idallen@ncf.ca
       Home Page on the Ottawa FreeNet: http://www.ncf.ca/~aa610/
       College professor at: http://www.algonquincollege.com/~alleni/
       Board Member, TeleCommunities CANADA  http://www.tc.ca/



Relevant Pages

  • Re: ssh Question
    ... > what command. ... Unsure what you mean with key/regenerate, you mean user, not host? ... Another thing, could be the log files in /var/log, sshd logging can ... > I can also have a banner and welcome page, I know in sshd, you can ...
    (comp.os.linux.security)
  • Re: sshd & passwd
    ... > I am using cygwin with sshd. ... if i want to add an new user into my passwd with the ... > following command: ...
    (comp.security.ssh)
  • Re: takes forever to ssh from one host to another, sometimes
    ... > igor> i'll tell you the truth, as one igor to another:), i just ... > igor> command and no restart was necessary. ... > see a difference unless you're managing sshd via inetd. ...
    (comp.security.ssh)
  • SSHD configuration for root: "forced-commands-only"
    ... I'm trying to configure SSHD to allow root login only for remote ... According to the description of PermitRootLogin in the ... public key authentication will be allowed, but only if the command ... SSHD is configured for root equivalence between the two ...
    (alt.os.linux.suse)