I'm reading the source code of sshfs. And I find out that when trying to give the password to ssh, it write the password to /dev/ptmx.
write(sshfs.ptyfd, sshfs.password, strlen(sshfs.password));
I know it's the master side of pseudo-terminal, but I don't really understand meaning of writing to it. I tried to echo something to /dev/ptmx but nothing happened. Maybe I'm not fully understand the mechanism of pts and ptmx.