Hello community. I come seeking help only after many hours of research, so I would be very appreciative if anyone has any ideas regarding this issue.
I develop some programs which usually run on the ubuntu 14.04 server platform. A small part of one of the python programs involved automatically setting up an sshfs mounting for a user. The user will already have a public key file installed on the remote machine. Sometimes, the key files have passphrases, which I will get from the user (either at the time or stored). On ubuntu, the following code worked correctly to set up the mounting if they had a passphrase:
Code:
proc = pexpect.spawn('sshfs %s@%s:%s...') #many options
proc.expect([pexpect.EOF, 'Enter passphrase for key.*', pexpect.TIMEOUT], timeout=30)
if proc.match_index == 1:
proc.sendline('thepassphrase')
Now for annoying reasons I must move the application to a RHEL 6.5 server. I have managed to solve most/all of the problems except this one. The above code seemingly never enters the passphrase. I have tried waiting, entering twice, many other things. But I do get EOF after entering the first time, as expected, the process just does not work. I believe part of the problem is the openssh version. RedHat currently only supports up to 5.3, yet 6.6 was installed on the ubuntu server I was working with. (also, SSHFS on redhat is 2.4 while on ubuntu it is 2.5)
The issue, stated explicitly, is that the mounter folder is listed as 'transport endpoint is not connected'. This is usually a sign that the sshfs command was interrupted in the middle.
SElinux is disabled, and of course the offending command works find if run manually.
Thank you for any insight you may have!