____________________________________________________
script for finding ssh-agent at login
Mon, 2 Feb 2004 14:02:38 +0100
Karl-Heinz Herrmann, Ramon van Alteren ([57]The LG Answer Gang)
Hi,
I ran into an annoying problem with ssh-agents. If you don't start one on
the very first login screen from which you start X you can't access the
agent from any xterm started from the window-manager. Starting new ones is
no good idea if one is already running. This script will look for a running
ssh-agent and set the environment variables so it can be contacted. If none
is running it will start one. As on ssh-login with enabled "AGENT
Forwarding" the environment variables will be set and the remote ssh-agent
(where you are connecting from) one will be used.
See attached [58]sshssearch-old.bash.txt
unfortunately there has been a change in "interface" of "ssh-add -l" --
before it was giving exit code 0 for "agent is there, with or without keys"
and 1 for "no agent".
Now it's finegrained to: 0 for "agent with keys" , 1 for "agent without
keys" and 2 for "no agent".
See attached [59]sshssearch-new.bash.txt
of course you have to "source" the script to set the local environment
variables:
source sshsearch.sh or . sshsearch.sh
to make it automatic call it from .profile (or .bashrc).
Ben (or whoever feels its to clunky): feel free to make it into a one-liner
:-)
K.-H.
[Ramon] I'm familiar with the problem and found a small tool to deal with
it. It was written by Daniel Robbins.
Here's the relevant part of the manpage:
...............
NAME
keychain - a program designed to keep ssh-agent processes alive across
multiple logins.
DESCRIPTION
Keychain is an OpenSSH key manager, typically run from ~/.bash_profile.
When run, it will make sure ssh-agent is running; if not, it will start
ssh-agent. It will redirect ssh-agent's output to
~/.keychain/[hostname]-sh, so that cron jobs that need to use ssh-
agent keys can simply source this file and make the necessary passwordless ssh
connections. In addition, when keychain runs, it will check with ssh-agent
and make sure that the ssh RSA/DSA keys that you specified on the keychain
command line have actually been added to ssh-agent. If not, you are prompted
for the appropriate passphrases so that they can be added by keychain.
...............
Although it creates a security risk, (don't leave any consoles open
unattended, all your keys are cached) I've found it extremely pleasant to
work with.
Here's the link:
[60]http://www.gentoo.org/proj/en/keychain.xml
Can't beat homegrown scripts though :) It's too much fun to make 'm.
Hope it's useful
____________________________________________________
Xine problem
Fri, 06 Feb 2004 11:33:02 +0530
Aditya Godbole ([61]aditya_godbole from infy.com)
I am using RH8 linux and successfully installed xine for video play. Video
cds(.dat format) are functioning well with xine. But I cannot play the
video files (in .dat format) copied to hard disk.
Hi, Rename the files from .dat to .mpg or .mpeg. Works for me.
Regards,
Aditya Godbole.
Even the laws of nature cannot produce the right results unless
the initial conditions are entered correctly.
Prof. Yash Pal
(Techfest 2004)
____________________________________________________
Floppies on CD - the ultimate collection
09 Feb 2004 20:20:38 -0500
=6= |