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 email@example.com:/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
sshpass but not working:
sshpass -p myPassword sshfs firstname.lastname@example.org:/home/user /mnt/remote
Shell blocked and getting the same error.
Note: If I run
sshpass -p vedams123 sshfs email@example.com:/home/user /mnt/remote, working withour any problem.