Re: ssh-agent with default runlevel of 5

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

 



Anne Possoz wrote:

Can someone tell me where to call the ssh-agent from when using a
default run level of 5. I usually use run level 3 and place the required
commands in .xinitrc in my home directory, but I have found that using
run level 5 this file is not used.
The sshd daemon is set to run at runlevel 5 by using the chkconfig
command as so: chkconfig --level 5 sshd on

By the way: chkconfig --level 35 sshd on
will get it to run at levels 3 and 5 by default.

That's not what Neil is talking about.  He wants to start ssh-agent, thus
have a window pop up to enter the pass phrase.

If I understand well Neil query, here is what I do.

I edit /etc/X11/xinit/Xclients file and add the following lines at the beginning of the file:

# patch /etc/X11/xinit/Xclient for SSH ---------------------------
if [ -z "$SSH_AGENT_PID" -a -x /usr/bin/ssh-agent ]
then
        exec /usr/bin/ssh-agent $0  ${1+"$@"} < /dev/null
fi
if [ -r $HOME/.ssh/id_dsa ]
then
        /usr/bin/ssh-add $HOME/.ssh/id_dsa < /dev/null
elif [ -r $HOME/.ssh/identity ]
then
        /usr/bin/ssh-add $HOME/.ssh/identity < /dev/null
fi
# end of patch for ssh --------------------------------------------

This works for gnome and kde.
Very usefull if frequent ssh connections to remote accounts are needed.
You might want to check out Keychain:
http://www.gentoo.org/proj/en/keychain.xml

A cool and easy bash script that handles some of the complexities of ssh-agent gracefully.

Best Regards,
Keith
--
LPIC-2, MCSE, N+
We drive on this highway of fire
Got spam? Get spastic http://spastic.sourceforge.net



--
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux