Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

For my normal login with ssh I have in my ~/.ssh/config the following lines:

GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes

... so that if I call kinit and get a Kerberos ticket then I can connect with ssh without typing in the password.

How do I make sshfs use the same ticket to mount a remote directory without asking for the password?

(right now I'm getting an error saying remote host has disconnected)

And what would an entry for /etc/fstab look like for that? Right now I have this:

sshfs#username@remoteHost: mountpoint fuse comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes 0 0

BTW: I need to make it use the Kerberos ticket and not my RSA or DSA keys, because that is forbidden on the remote host side.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you run sshfs ... in a terminal, in your own user account, then it will use exactly the same SSH settings – and Kerberos tickets – as plain ssh and sftp commands (since it just launches ssh -s sftp).

If it does not, try the -o debug and/or -o sshfs_debug options. Also make sure you're giving the same server hostname to sshfs.

I cannot give a good answer for fstab until you get plain sshfs working, but you will likely need to kinit as root too (but with your own Kerberos principal), or use k5start to automatically do it on boot.

share|improve this answer
    
using the debug options and running sshfs in terminal as you suggested showed that my settings, namely: GSSAPIAuthentication yes GSSAPIDelegateCredentials yes were not used. This was because they were defined for specific host. The trick was to use the host alias I define in my ~/.ssh/config in /etc/fstab. –  Asen Christov Mar 11 '13 at 16:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.