Friday, February 27, 2026

Re: sshfs (ssh-fuse) with -o password_stdin : failed to open pty

On 2026-02-27 20:41, Zé Loff wrote:
> On Fri, Feb 27, 2026 at 06:49:28PM +0100, Sylvain Saboua wrote:
>> I am trying to mount via ssh(8) a distant repertory from an openbsd
>> server
>> on a newly installed local openbsd machine (client). I have
>> successfully
>> attempted the same mount on other client machines. But here something
>> does
>> not work :
>>
>> $ doas sshfs -o idmap=user,allow_other,uid=1000,gid=1000 media@lap:
>> /home/media
>> media@lap's password:
>> $ doas umount /home/media
>> $ su -
>> Password:
>> # echo 'P455W0RD' | sshfs -o password_stdin media@lap: /home/media
>> failed to open pty: No such file or directory
>> #
>>
>> The point of using the password_stdin option is to automatically mount
>> the
>> repertory at boot. I've searched/checked for various things, without
>> success. What could be wrong ?
>
> Man page states that password_stdin is only for pam_mount.

Indeed, my bad, I failed to read the critical part :
-o password_stdin
read password from stdin (only for pam_mount!)
(sshfs manpage)

> Also, why not use keys?

Because I want the repertory readily accessible by non-technical users,
for whom sftp is already complex enough. Ironically, pam_mount applies
precisely to my use case, i.e. automatic mount at boot/login. I shall
remain with an alias for the mount command and type the password(s).

--
Sylvain Saboua
looking for a PDP-11

No comments:

Post a Comment