[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh setup: what is the Debian way? [not what I asked for, but OK ]



On 2007-04-08 21:24:00 -0600, Paul E Condon wrote:
> So, I learned a lot about what doesn't work for me. I settled on
> adding the following to my .bashrc:
> 
> if [ -x /usr/bin/ssh ] && [ -d ~/.ssh ]; then
>    function ssh {
>       if [ "The agent has no identities." = "$(ssh-add -L)" ]; then
>          ssh-add
>       fi
>       /usr/bin/ssh $@
>       unset -f ssh
>    }
> fi

I do something similar (but with zsh, as it is my shell), but also
with the other ssh commands:

ssh()    { ssh_wrapper ssh "$@" }
slogin() { ssh_wrapper slogin "$@" }
scp()    { ssh_wrapper scp "$@" }
sftp()   { ssh_wrapper sftp "$@" }

IMHO, this is better: if I don't need to use ssh in the session,
I won't have to type my passphrase.

-- 
Vincent Lefèvre <vincent@vinc17.org> - 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)



Reply to: