On 2007-04-09 09:39:20 -0600, Paul E Condon wrote:
> Is ssh_wrapper available in Debian?

No, this is a script I've written.

> What does it do?

It does the ssh-add. Well, a little more:

#!/usr/bin/env zsh

# You may call "ssh_wrapper true" to initialize.

emulate -LR zsh
local cmd

if [[ "$1" == -exec ]] then
  cmd=exec
  shift
else
  cmd=command
fi

cmd=($cmd $1)
shift

autoload -U _call_sshadd
_call_sshadd "$@"

if [[ -z $SSH_CONFIG ]] then
  export SSH_CONFIG=$HOME/.ssh/config
  [[ -e ${SSH_CONFIG}-old && `command ssh -V 2>&1` == OpenSSH_3.* ]] &&
    SSH_CONFIG=${SSH_CONFIG}-old
fi

$cmd -F $SSH_CONFIG "$@"

where _call_sshadd is a zsh function I've written to call the ssh-add
when need be. I also use ssh_wrapper in scripts, e.g. I have a xrsh
script that does:

exec ${XTERMINAL:-xterm} -e ssh_wrapper -exec ssh "$@"

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to