9

I'm trying to mount a folder over ssh using sshfs. Evertime I do so I get the error

No such file or directory

My terminal:

user@computer:~$ sshfs admin@server.com:/volume1/somedir ~/mnt/somedir
admin@server.com's password: 
admin@server.com:/volume1/somedir: No such file or directory

It returns the directory listing, as expected if I try:

ssh admin@server.com ls /volume1/somedir

This is Ubuntu 12.04 connecting to a Synology NAS with DS4.1

What am I doing wrong here?

rubo77
  • 32,486
csauve
  • 561
  • 2
  • 4
  • 11
  • If you try to mount something in ~/ see http://askubuntu.com/questions/99997/sshfs-no-such-file-error – rubo77 Dec 03 '16 at 07:56
  • In Ubuntu, after typing the first part sshfs admin@server.com:, you can press tab and it will automatically find the home directory. – dc914337 Jan 25 '23 at 20:13

3 Answers3

20

So aparently when connecting to sftp on a Synology, / is the list of shares. So I just have to do:

sshfs admin@server.com:/somedir ~/mnt/somedir
csauve
  • 561
  • 2
  • 4
  • 11
3

try

sshfs admin@server.com:/remotedir ~/mnt/localdir

where remotedir is dir you normally specify after volume1

or

sshfs admin@server.com:/ ~/mnt/localdir
user266573
  • 31
  • 2
0

I had the same error on connecting to a VM in a Debian xen host where I have forwarded every VM ssh port to another port.

All paths were correct, when testing with ssh admin@server.com ls. In the end, I noticed, that I mixed up the ports, because I had set a rule to use a certain port in my

~/.ssh/config

that was not used when trying via sshfs

so better add the port to both commands, when testing with

ssh -p<someport> admin@server.com ls /volume1/somedir
sshfs -p<someport> admin@server.com:/volume1/somedir ~/mnt/somedir
rubo77
  • 32,486