LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-20-2013, 02:22 PM   #1
eponymous
Member
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 78

Rep: Reputation: 15
gvfs not working with ssh-agent


Hi,

I've got Gnome installed and want to connect to a remote server directory over SSH using ECDSA private keys. Since gnome-keyring doesn't support ECDSA I've removed it from the "run at startup" list from Gnome. Instead, when I log in, I run:

Code:
ssh-add ~/.ssh/id_ecdsa
That way I get prompted to enter my passphrase when I log in and it adds the keys to OpenSSH agent.

From the command line I can SSH into my machine without being asked for a passphrase.

However if I do:

Code:
gvfs-mount sftp://user@machine/home
I always get "permission denied" as if it isn't even trying use the keys held in ssh-agent.

This happens even with DSA or RSA keys.

If I re-enable gnome-keyring at startup, then it will work with RSA/DSA keys (asking for a passphrase) but obviously this doesn't work with ECDSA.

I have this working just fine in Xubuntu so I don't know what is different on my Gentoo install.

Last edited by eponymous; 03-22-2013 at 01:50 PM.
 
Old 03-22-2013, 12:11 PM   #2
eponymous
Member
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 78

Original Poster
Rep: Reputation: 15
Ok so I got a bit further with this.

It seems gvfsd is not looking at my SSH_AUTH_SOCK.

If I start "gvfsd -r" in a shell with SSH_AUTH_SOCK set properly then it works.

So what I need to know is how can I set SSH_AUTH_SOCK at startup so the environment that gvfsd runs in will pick it up?

I gues this implies that ssh-agent needs to run before gvfsd as well. Is that possible?
 
Old 03-22-2013, 01:50 PM   #3
eponymous
Member
 
Registered: Oct 2004
Distribution: Gentoo
Posts: 78

Original Poster
Rep: Reputation: 15
Solved:

Adding:

Code:
eval `/usr/bin/ssh-agent`
to my /etc/lightdm/Xsession script fixed the problem.

This ensures that ssh-agent is started and that the variables are exported before any of the other services like GVFS are started.
 
  


Reply



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
gvfs-mount not working from command line (Fedora 11 x86-64) ajitabhpandey Fedora 1 01-23-2010 11:34 AM
[SOLVED] ssh-agent -> The agent has no identities. windstory Linux - Security 2 11-19-2008 06:45 PM
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
ssh-agent not working properly... assasukasse Linux - Software 1 10-09-2007 12:18 PM
ssh-agent/ssh-add question mega Slackware 2 01-26-2005 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:03 AM.

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