ssh argv[0] support

Nicolas Williams Nicolas.Williams at ubsw.com
Sat Sep 15 01:59:36 EST 2001


Why would you want this feature anyways???

It doesn't scale, for one, and is just ugly, not to mention the fact
that it pollutes the command namespace and that namespace collisions
could break your scripts?

Nico


On Fri, Sep 14, 2001 at 04:52:19PM +0100, Jonathan Amery wrote:
> In article <84vgim2bv6.fsf at rjk.greenend.org.uk> you write:
> >Jonathan Amery <jdamery at pick.ucam.org> writes:
> >
> >> #! /bin/sh -e
> >> if [ "${0##*/}" == "ssh-argv0" ]
> >> then
> >>   echo 'ssh-argv0: This script should not be run like this, see
> >> ssh-argv0(1) for details' 1>&2;
> >>   exit 1;
> >> fi
> >> ssh "${0##*/}" "$@"
> >What's wrong using with shell aliases to achieve the same effect?
> 
>  (a) This replaces a feature that was removed from openssh in
> 2.3.something (or there abouts).
> 
>  (b) The only way I've seen the feature used on a large scale is to
> have a symlink farm in /usr/local/<something> which then allows all
> users of the machines to use this feature, regardless of which shell
> they use (and in local scripts and the like).
> 
> >In fact I think shell aliases are actually better.  For example, using
> >bash alias syntax:
> >
> >  alias pick="ssh jdamery at pick.ucam.org"
> >
> >would work even when ucam.org wasn't in the DNS search list or when
> >your local username wasn't jdamery, situations in which just linking
> >~/bin/pick to your proposed ssh-argv0 would fail.
> 
>  That's what your .ssh/config is for, for example (from my .ssh/config 
> at work):
> 
> Host chiark
> HostName login.chiark.greenend.org.uk
> Compression yes
> CompressionLevel 9
> User jdamery
> FallBackToRsh no
> 
>  And a symlink from ~/bin/chiark -> /usr/bin/ssh
> 
>  However, I do suspect that most users of the feature are sysadmins of 
> machines within the same administrative control and hence this will
> not be needed.
> 
>  Jonathan.
--

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.




More information about the openssh-unix-dev mailing list