ssh argv[0] support

Jonathan Amery jdamery at pick.ucam.org
Fri Sep 14 04:41:06 EST 2001


 Right - I know you've had a discussion about the argv[0] stuff
already, but I've written this simple script to simulate the (now
missing) support for Debian, and was asked to send it to you...

--- ssh-argv0 ---
#! /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##*/}" "$@"
------ end ------
-- ssh-argv0.1 --
.Dd September 7, 2001 
.Dt SSH-ARGV0 1
.Os Debian Project
.Sh NAME
.Nm ssh-argv0
.Nd replaces the old ssh command-name as hostname handling
.Sh SYNOPSIS
.Ar hostname | user at hostname
.Op Fl l Ar login_name
.Op Ar command
.Pp
.Ar hostname | user at hostname
.Op Fl afgknqstvxACNPTX1246
.Op Fl c Ar cipher_spec
.Op Fl e Ar escape_char
.Op Fl i Ar identity_file
.Op Fl l Ar login_name
.Op Fl m Ar mac_spec
.Op Fl o Ar option
.Op Fl p Ar port
.Oo Fl L Xo
.Sm off
.Ar port :
.Ar host :
.Ar hostport
.Sm on
.Xc
.Oc
.Oo Fl R Xo
.Sm off
.Ar port :
.Ar host :
.Ar hostport
.Sm on
.Xc
.Oc
.Op Ar command
.Sh DESCRIPTION
.Nm
replaces the old ssh command-name as hostname handling.
If you link to this script with a hostname then executing the link is
equivalent to having executed ssh with that hostname as an argument.
All other arguments are passed to ssh and will be processed normally
.Sh OPTIONS
See
.Xr ssh 1
.Sh FILES
See
.Xr ssh 1
.Sh AUTHORS
OpenSSH is a derivative of the original and free
ssh 1.2.12 release by Tatu Ylonen.
Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,
Theo de Raadt and Dug Song
removed many bugs, re-added newer features and
created OpenSSH.
Markus Friedl contributed the support for SSH
protocol versions 1.5 and 2.0.
Jonathan Amery wrote this ssh-argv0 script and the associated
documentation.
.Sh SEE ALSO
.Xr ssh 1
------ end ------
----- patch -----
--- ssh.1.orig  Fri Sep  7 20:03:05 2001
+++ ssh.1       Fri Sep  7 20:17:29 2001
@@ -1404,6 +1404,7 @@
 .Xr scp 1 ,
 .Xr sftp 1 ,
 .Xr ssh-add 1 ,
+.Xr ssh-argv0 1 ,
 .Xr ssh-agent 1 ,
 .Xr ssh-keygen 1 ,
 .Xr telnet 1 ,




More information about the openssh-unix-dev mailing list