LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-05-2007, 07:29 AM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Question ssh-askpass in F7


Hi !

I am migrating from openSuSE 10.2 to F7.

I used to have a $HOME/.xinitrc with the following content, near to the end of file:
Code:
eval `ssh-agent -s`
ssh-add
So, during this X session I don't need to type my passphrase to open my $HOME/.ssh/id_dsa file, each time I want to ssh some server.

How to get the same funcionallity in F7 ?

Looks like the default /etc/X11/xinit/xinitrc file provided with F7 call ssh-agent in a different way, so I am not sure how to integrate ssh-add and gaskpass with the xinitrc file from F7.

from /etc/X11/xinit/xinitrc-common:
Code:
...
# Prefix launch of session with ssh-agent if available and not already running.
SSH_AGENT=
if [ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ]; then
    if [ "x$TMPDIR" != "x" ]; then
        SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR"
    else
        SSH_AGENT="/usr/bin/ssh-agent"
  fi
fi
...
and, from /etc/X11/xinit/xinitrc:
Code:
...
elif [ -f /etc/X11/xinit/Xclients ]; then
    exec $SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients || \
    exec $SSH_AGENT /etc/X11/xinit/Xclients
else
...
I try to modify the line, from:
Code:
SSH_AGENT="/usr/bin/ssh-agent"
to
Code:
SSH_AGENT="eval `ssh-agent -s`; gaskpass | ssh-add"
but no success...

If anyone has the solution, or at least better ideas, please !
 
Old 06-19-2007, 12:39 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499

Original Poster
Blog Entries: 2

Rep: Reputation: 68
solved

If there are anyone following this thread, I found a solution, more simple than I expected.

Copy /etc/X11/xinit/Xclients to $HOME/.Xclients and add "/usr/bin/ssh-add" just after GSESSION and STARTKDE lines.

The resulting file looks like:
Code:
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

GSESSION="$(which gnome-session 2>/dev/null)"
STARTKDE="$(which startkde 2>/dev/null)"

# Run ssh-add
/usr/bin/ssh-add

# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
 
  


Reply

Tags
f7, pass, ssh



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
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
ssh-askpass missing? nsushkin Slackware 0 02-25-2004 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration