starting ssh-agent as parent of X session for SSH

starting ssh-agent as parent of X session for SSH

Post by doug reed » Sun, 31 Dec 1899 09:00:00



I have SSH up and running on some systems, but I would like to
have ssh-agent run as the parent of X, so that ssh-agent can
handle the user's keys.

When a machine is set up for console login, I can get everything running
by entering at the console:

$ ssh-agent startx

and then in a shell window under X:

$ ssh-add

Thereafter, ssh-agent handles the user's keys, and all is copacetic.

However, I do not see a way to get this all going when the machine is
set up for graphical login (i.e. X starts right after the machine
boots). How is this normally done?  Do I need to edit the startx
script?

--
P. Douglas Reeder      Lecturer, Computer. Science. Dept., Ohio State Univ..


R>+ tv+ b+++>$ DI+ D- G e+++ h r+>+++ y+>++

 
 
 

starting ssh-agent as parent of X session for SSH

Post by Robert Lync » Sun, 31 Dec 1899 09:00:00



> I have SSH up and running on some systems, but I would like to
> have ssh-agent run as the parent of X, so that ssh-agent can
> handle the user's keys.

> When a machine is set up for console login, I can get everything running
> by entering at the console:

> $ ssh-agent startx

> and then in a shell window under X:

> $ ssh-add

> Thereafter, ssh-agent handles the user's keys, and all is copacetic.

> However, I do not see a way to get this all going when the machine is
> set up for graphical login (i.e. X starts right after the machine
> boots). How is this normally done?  Do I need to edit the startx
> script?

> --
> P. Douglas Reeder      Lecturer, Computer. Science. Dept., Ohio State Univ..


> R>+ tv+ b+++>$ DI+ D- G e+++ h r+>+++ y+>++

I don't know if this is the BEST way, but the way I did it is to
edit /etc/X11/xdm/Xsession:
...
case $# in
1)
    case $1 in
    failsafe)
       exec xterm -geometry 80x24-0-0
       ;;
    gnome)
       exec gnome-session
       ;;
    kde|kde1)
    # 10-17-00 start with ssh-agent
       exec ssh-agent /usr/share/apps/switchdesk/Xclients.kde
       #exec /usr/share/apps/switchdesk/Xclients.kde
       ;;
    kde2)
...

HTH. Bob L.
--


 
 
 

starting ssh-agent as parent of X session for SSH

Post by Bernd Eckenfel » Wed, 29 Nov 2000 13:53:49



Quote:> I have SSH up and running on some systems, but I would like to
> have ssh-agent run as the parent of X, so that ssh-agent can
> handle the user's keys.

With the current ssh-agent you only need to run it as a sister of the
session. (and get the envirenment variables set).

Quote:> $ ssh-agent startx

You should better set the exec ssh-agent <your window manager> in .xsession
since the ssh agent needs to be directly connected by sockets and
environment, both wont work with x servers in between.

Greetings
Bernd

 
 
 

starting ssh-agent as parent of X session for SSH

Post by Sven Maschec » Sun, 31 Dec 1899 09:00:00


 > I have SSH up and running on some systems, but I would like to
 > have ssh-agent run as the parent of X, so that ssh-agent can
 > handle the user's keys.

I never tried (usually start X11 from commandline) but bookmarked this:
<URL:http://www.ntrnet.net/~jmknoble/software/x11-ssh-askpass/>
You'll find screenshots there.
I don't know if(/why) it really only runs with OpenSSH.

"x11-ssh-askpass is a lightweight passphrase dialog for OpenSSH or
 other open variants of SSH. [...]
 x11-ssh-askpass uses only the stock X11 libraries (libX11, libXt)
 for its user interface."

f'up!
Sven

 
 
 

1. can ssh-agent work between ssh-2.3 and ssh-3.5

I have a Sun workstation copying files from a couple of Sun servers.
ssh-agent is used to avoid providing password when scp is done from crontab.
The ssh version on the workstation is 2.3. But I've just upgraded one server
to ssh-3.5, and seems ssh-agent is not working when trying to communicate
with this high version ssh machine.

Here's what I get:
warning: Authentication failed.
Disconnected; authentication cancelled by user (Authentication cancelled by
user.).
scp: warning: ssh2 client failed to authenticate. (or you have too old ssh2
installed, check with ssh2 -V)

Does any one know whether it's possible that ssh-agent running on ssh-2.3
can get authenticated on ssh-3.5? Do I need to upgrade the workstation as
well ( that will mean all other servers need to be upgraded as well, which
is not quite likely at this time ) If not, how can I set up the ssh-agent?

Thanks all

2. samba permissions 2.part

3. Any reason not to use ssh-agent to start an X session?

4. Windowmaker Themes problem

5. Problem with ssh-agent and ssh-add

6. Apache 1.2 & mod_headers

7. ssh-agent and Gnome on Solaris...Doesn't work

8. solution to wrap problem

9. xdm + ssh-agent

10. ssh-agent behaviour on s10_63??

11. ssh-agent and X on s10_63 (x86)?

12. ssh-agent question

13. Help with ssh-agent please?