I want to mount a remote directory and I want to automate this. So I write below script which not working properly.
#!/usr/bin/expect -f
spawn sshfs vedams@192.168.5.109:/home/user /mnt/remote
expect "assword:"
send "myPassword\r"
When I run the above script and if check
ls /mnt/remote
, it is giving below error:
ls: cannot access /mnt/remote: Transport endpoint is not connected
I used sshpass
but not working:
sshpass -p myPassword sshfs user@192.168.5.109:/home/user /mnt/remote
Shell blocked and getting the same error.
Note: If I run sshpass -p vedams123 sshfs vedams@192.168.5.109:/home/user /mnt/remote
, working withour any problem.
Asked by gangadhars
(727 rep)
Nov 10, 2014, 02:05 PM
Last activity: Jul 9, 2025, 07:08 AM
Last activity: Jul 9, 2025, 07:08 AM