Re: Multiple forced commands being executed

FYI - ssh version is:

OpenSSH_5.4p1 FreeBSD-20100308, OpenSSL 0.9.8n 24 Mar 2010

And now I am using my own smtp not Gmail's blacklisted ones hopefully this message will actually make it to the list...

On 03/02/2011, at 1:44 PM, Mark Aufflick wrote:

FYI I am seeing exactly the same issue. The -vv output on the client
shows running a huge number of commands (not totally sure if it
correlates to the number of entries in authorized_keys or just the
number preceding the matched key - I think it's the latter) and
judging by the pid of the command that finally ends up being run those
log entries are actually related to commands being run and abandoned.

It's like the forced command is executed prior to the key being
checked? Besides wasting resources it's potentially doing things you
don't expect (what if the command had a side effect) and slowing down
the connection.

I assume it's not intended behaviour? Neither the command="command"
section of the ssh man page nor the ForceCommand section of
sshd_config make any reference to it so I presume not.

Let me know if I can provide any more useful info - I'm going to have
a quick hunt in the sshd code to see if I can find anything obvious,
but I'm not familiar with the code base so don't hold your breath.


Mark Aufflick

Relevant Pages

  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
  • Re: OT: Hard disk mirror with Paragon on USB stick?
    ... at least two pages of intricate command line stuff. ... The password is only used when you want to backup to a remote machine ... via the network, using the ssh protocol. ... (e.g. with linux, ...
  • RE: midnight commander and ssh sftp
    ... midnight commander and ssh sftp ... which is displayed at the bottom of the MC panel. ... "Left file command options right" at the top of the MC ... MC SSH session with the remote host by hitting F10 key. ...
  • Re: sshd and ftpd
    ... ssh keys, so when you log in it doesn't ask for one. ... we want to be able to connect to our remote host without ... If you used the defaults supplied by the ssh-keygen command, ...
  • Re: [Info-ingres] problems with ssh
    ... Check the SSHD log on the server for errors. ... ancient version of SSH, unfortunately. ... the command seems to have functioned - but just wont terminate and leaves a process hanging around. ... Duckman: You got anymore of those glues? ...