Feature request: fsh-like functionality

Christian Iversen chrivers at iversen-net.dk
Fri Jul 23 19:59:55 EST 2010


On 2010-07-23 11:14, Norbert Nemec wrote:
> On 23/07/10 09:50, Norbert Nemec wrote:
>> Hmm - based by these numbers I did some further test and am now
>> suspecting that it is actually the login process of the bash that is
>> eating up the time. Unfortunately, I cannot easily simplify the login
>> scripts as a number of modules needs to be loaded. Furthermore, it is
>> not quite clear to me which scripts are actually executed when calling
>> 'ssh somehost "command"'. According to the documentation "command" is
>> executed instead of a login shell. Still, the .bashrc seems to be read.
> Update: The real problem are /etc/bash.bashrc and /etc/profile -- both
> files are very complex and take significant time to process. I have no
> influence on the setup of the system. SSH does not seem to offer any way
> to issue a command without calling either of these two files. Am I
> missing something?

How about making a wrapper executable, that simply exec's the arguments 
it gets? If you set this program as the shell, your commands should 
execute quite quickly. If you need shell expansion, you should use the 
smallest shell you can use.

Note that zsh, even though it is more complex, can be quicker than bash 
to start because it has more fine-grained support for which startup 
scripts to load. Also, dash (a version of /bin/sh) is very light.

-- 
Med venlig hilsen
Christian Iversen


More information about the openssh-unix-dev mailing list