LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-11-2004, 11:01 AM   #1
tawalker
Member
 
Registered: Jan 2004
Location: UK
Distribution: Red Hat 9
Posts: 52

Rep: Reputation: 15
Starting ssh-agent with GNOME/GDM


I have an RH9 workstation, and would like to have ssh-agent start around the same time as X and/or GDM, so it is running throughout my X session. (It doesn't appear to be running on the system, judging by the output of ps aux | grep ssh-agent.)

I've searched this forum and Googled for an answer to how to achieve this, but I haven't found one answer which agrees with another. This post is one example, and I have found others, but none seem to agree on one (or the best) approach - do I set up a ~/.Xclients file, an ~/.xsession file, or whatever?

Have any of you GNOME users found a solution which works well for you?

Many thanks,
Tim.
 
Old 05-11-2004, 01:29 PM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I've always used a file called .xinitrc (dot-xinitrc) to lauch apps when starting X....works well, I've never had problems. try out..if you don't have the file, just create it. don't need any scripting or anything, just put the commands and possible argument,s one per line, save and restart X.
 
Old 05-11-2004, 03:53 PM   #3
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Heh, why use .xinitrc if you can do it with X in the first place. NAvigate through the GNOME foot to the System settings and server settings. There choose Services and type in your root password. You will then get a list of all demons you can use and check the one you need (sshd is for ssh) press Start. And don't forget to File --> Save before you exit.

That configuration aplies for any other demon you want to start and make it an autostart. If you don't want to make it an autostart just press Start and don't check it in the list or you can use a command in a command line: /sbin/service name_of_daemon (like sshd) start | stop | restart

Hope this helps you a little.

Peace!
 
Old 05-12-2004, 03:13 AM   #4
tawalker
Member
 
Registered: Jan 2004
Location: UK
Distribution: Red Hat 9
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Heh, why use .xinitrc if you can do it with X in the first place. NAvigate through the GNOME foot to the System settings and server settings. There choose Services and type in your root password. You will then get a list of all demons you can use and check the one you need (sshd is for ssh) press Start. And don't forget to File --> Save before you exit.
Ah, the GNOME Services applet - I know it well

In fact, sshd is running perfectly on the machine, so no complaints there - I can log in with no problems using public-key authentication. It's ssh-agent I'm interested in - i.e. the program which stores your decrypted private key, so that you can log in "seamlessly" via SSH to another host, without having to type in a password or a private key's passphrase.

Since I originally posted, I found that ssh-agent is in fact running, though I don't know if it's because I added it to an ~/.xsession file, or because it was always running and I failed to find it with "ps". The problem was that I didn't understand the importance of the "ssh-add" command, which I now know is the equivalent of the "Add Key" procedure in Pageant (PuTTY's authentication agent).

In short, when I add my private key with "ssh-add", everything works perfectly - even my Sharp Zaurus now accepts public-key SSH logins, whereas it always asked for a password before.

Basically, I'm happy now Thanks for your help!

Tim
 
Old 05-12-2004, 03:24 AM   #5
rmanocha
Member
 
Registered: Oct 2003
Location: Austin,TX
Distribution: Debian SID-->fully content-->Love APT,kernel 2.6.4
Posts: 327

Rep: Reputation: 30
my .xinitrc entry:
Code:
exec ssh-agent sh -c 'ssh-add > /dev/null & sleep 5 ; exec openbox'
Put this in your .xinitrc and start X with startx
change the exec openbox line to watever WM u use..startkde for KDE,gnome-session for GNOME, fluxbox for fluxbox,etc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
ssh-agent is starting? Vgui Slackware 3 10-21-2005 09:30 PM
ssh-agent/ssh-add question mega Slackware 2 01-26-2005 03:09 AM
ssh-agent podollb Linux - Networking 15 10-16-2003 12:51 AM
ssh-agent problem (using GDM & KDE) ocularbob Linux - Software 1 04-11-2003 04:15 PM


All times are GMT -5. The time now is 12:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration