Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
So I have an agent started, now how would I go about doing a ssh-add to be automatic too? I know I have to enter a passphrase but if I only had to do that on boot that would be great, then all other xterms would be running that agent (correct?) -- so what I am hoping to accomplish is automate the process I normally have to do to get into my server at work, which is:
<I type the passphrase>
I was expecting to see ssh-agent having started your window manager. Your ps -ef | grep ssh-agent show that ssh-agent isn't running, it just matched the grep process. I'm not in work until Monday so can't really look until then. But I'm sure it was just in /etc/X11/somehwere. Try grep'ing for ssh-agent in that directory and see what you find.
Sorry that I can't be more specific, it was already setup on my RH9 build out of the box.
Do you have an .xinitrc file in your home directory? If this is where fluxbox is being started from then you simply need to put the /usr/bin/ssh-agent line in front of it. If its not being started from there, then you need to track down where it is being started.
Once you are in X you can run ssh-add in any of your xterms and from that point on every process you run under X will have access to your keypair. There is also a way to get ssh-add to use a graphical client to prompt you for you pass phrase at boot time. The directory you grep'ed earlier will contain examples. You need to set two environments one points to the programs that will be used for the pass phrase prompt.
So long as ssh-agent has been used to start your window mangaer then all your xterms (so long as they are started by the window manager) should be able to access your keys too. Just to confirm - you changed your .xinitrc so that the last line is something like exec ssh-agetnt windowManager and you have ran ssh-add in just one xterm? At this point you should be able to start another xterm and run ssh-add -l which should list your identities.
I think that putting ssh-agent in front of that will result in you storing the pid of ssh-agent rather than the WM but give it a so. Why are you storing the PID our or curiousity? If its to kill the WM then once you are starting it from ssh-agent you will want to kill ssh-agent instead anyway.
Apart from that yeah, spot on - just add the ssh-agent line
I just did it that way for no apparant reason, I started the wm as the first thing and then started other things later on in my .xinitrc and then at the end just wait on that wm's pid, but if that ssh-agent never expires I will just wait on that, no big deal.
So how do I go about starting the xterms via X programatically.
Now I have the ssh-agent starting my wm and later in my xinitrc file I had started a few xterms but they aren't started frmo the wm so they don't have the ssh-agent associated with them, but you were right any xterm I start from the wm have that association... But I wish I could have a few xterms load up on startup by the wm as to have that association, is that possible? Also just a quick note: Does the ssh-agent ever expire?