Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] gvfs not working with ssh-agent
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
eponymous
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2005
Posts: 136

PostPosted: Wed Mar 20, 2013 3:57 pm    Post subject: [solved] gvfs not working with ssh-agent Reply with quote

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 on Fri Mar 22, 2013 6:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
eponymous
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2005
Posts: 136

PostPosted: Fri Mar 22, 2013 5:10 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
eponymous
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2005
Posts: 136

PostPosted: Fri Mar 22, 2013 6:49 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum