https://bugzilla.mindrot.org/show_bug.cgi?id=1942

             Bug #: 1942
           Summary: mounting home directory with sshfs -o reconnect
                    requires patch for ssh
    Classification: Unclassified
           Product: Portable OpenSSH
           Version: 5.8p1
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: ssh
        AssignedTo: unassigned-b...@mindrot.org
        ReportedBy: e.kuemme...@fz-juelich.de


Created attachment 2097
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2097
Patch to add the option "-H path_to_per-user_configdir" to ssh

Hi,

we are using sshfs to mount the home directories via pam_mount, the
server is listed in /etc/ssh/ssh_known_hosts.
The problem is, that ssh always wants to read the directory ~/.ssh.

When the initial connection is established, the ssh process creates the
.ssh directory in the empty mount point directory. That doesn't harm
because sshfs can be forced with the nonempty option to mount on that
directory even though it is no longer empty.

But if the ssh connection to the server breaks and sshfs starts a new
ssh process to reconnect, ssh hangs in an uninterruptible sleep
(process state = D) when it tries to read ~/.ssh because the mounted
home directory is not available...

To overcome this deadlock, I patched ssh:
I added an new option "-H path_to_per-user_configdir" that allows to
use path_to_per-user_configdir/.ssh instead of ~/.ssh.
We use now "-H /dev/null". ssh then warns "Could not create directory
'/dev/null/.ssh'.", but the sshfs mount works properly, including the
reconnect feature.

IMHO that patch could also help other people, so I suggest to integrate
it in the openssh sources.

Thank you,
  Eberhard

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to